Fix two memory leaks.
authoryinpeijun <yinpeijun@huawei.com>
Mon, 28 Jul 2014 07:21:17 +0000 (15:21 +0800)
committerBen Pfaff <blp@nicira.com>
Mon, 28 Jul 2014 16:24:31 +0000 (09:24 -0700)
Found by coverity.

Signed-off-by: yinpeijun <yinpeijun@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
lib/stream-ssl.c
ovsdb/ovsdb-server.c

diff --git a/AUTHORS b/AUTHORS
index 3b8cc8c..69a854c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -103,6 +103,7 @@ Valient Gough           vgough@pobox.com
 Vivien Bernet-Rollande  vbr@soprive.net
 Wei Yongjun             yjwei@cn.fujitsu.com
 Yasuhito Takamiya       yasuhito@gmail.com
+yinpeijun               yinpeijun@huawei.com
 Yu Zhiguo               yuzg@cn.fujitsu.com
 ZhengLingyun            konghuarukhr@163.com
 Zoltan Kiss             zoltan.kiss@citrix.com
index cd4783c..79fa322 100644 (file)
@@ -1153,6 +1153,7 @@ read_cert_file(const char *file_name, X509 ***certs, size_t *n_certs)
             free(*certs);
             *certs = NULL;
             *n_certs = 0;
+            fclose(file);
             return EIO;
         }
 
index f64122e..9a66d79 100644 (file)
@@ -475,6 +475,7 @@ query_db_string(const struct shash *all_dbs, const char *name,
                                         &db, &table, &column);
         if (retval) {
             ds_put_format(errors, "%s\n", retval);
+            free(retval);
             return NULL;
         }