diff options
author | yinpeijun <yinpeijun@huawei.com> | 2014-07-28 15:21:17 +0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-07-28 09:24:22 -0700 |
commit | 96c02ceb79f0a1eb902a4dab53be16ee1177d9a3 (patch) | |
tree | 7ecde19c6bcdf838e04105b0dfdc3d3dd1b15ddd | |
parent | 8500b4e81925dc3921547a228ecc1af91aa2f9bf (diff) | |
download | openvswitch-96c02ceb79f0a1eb902a4dab53be16ee1177d9a3.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-- | AUTHORS | 1 | ||||
-rw-r--r-- | lib/stream-ssl.c | 1 | ||||
-rw-r--r-- | ovsdb/ovsdb-server.c | 1 |
3 files changed, 3 insertions, 0 deletions
@@ -126,6 +126,7 @@ Wei Yongjun yjwei@cn.fujitsu.com William Fulton YAMAMOTO Takashi yamamoto@valinux.co.jp 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 d774619ed..d1d9c3fe0 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -1195,6 +1195,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 a85a672a9..d85c4e118 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -519,6 +519,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; } |