summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryinpeijun <yinpeijun@huawei.com>2014-07-28 15:21:17 +0800
committerBen Pfaff <blp@nicira.com>2014-07-28 09:24:31 -0700
commita0a96cee0a9d85ec2175b9597d89f8cc2e9d0b55 (patch)
tree363f15f6536d186fd72a9769f74e9afa471c0752
parentd2c875feeff06f5e5c2cc11149a3779f60febad5 (diff)
downloadopenvswitch-a0a96cee0a9d85ec2175b9597d89f8cc2e9d0b55.tar.gz
Fix two memory leaks.
Found by coverity. Signed-off-by: yinpeijun <yinpeijun@huawei.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--AUTHORS1
-rw-r--r--lib/stream-ssl.c1
-rw-r--r--ovsdb/ovsdb-server.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 3b8cc8cc7..69a854cf8 100644
--- 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
diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c
index cd4783ca9..79fa322a0 100644
--- a/lib/stream-ssl.c
+++ b/lib/stream-ssl.c
@@ -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;
}
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
index f64122eb1..9a66d7985 100644
--- a/ovsdb/ovsdb-server.c
+++ b/ovsdb/ovsdb-server.c
@@ -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;
}