ovsdb-idl: Fix memory leak on error path.
authorBen Pfaff <blp@nicira.com>
Thu, 24 Jan 2013 22:19:20 +0000 (14:19 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 31 Jan 2013 22:15:58 +0000 (14:15 -0800)
Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/ovsdb-idl.c

index be4b255..1718969 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc.
+/* Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -2146,6 +2146,7 @@ ovsdb_idl_txn_process_insert_reply(struct ovsdb_idl_txn_insert *insert,
         VLOG_WARN_RL(&syntax_rl, "\"insert\" reply \"uuid\" is not a JSON "
                      "UUID: %s", s);
         free(s);
+        ovsdb_error_destroy(error);
         return false;
     }