diff options
author | Xin LI <delphij@FreeBSD.org> | 2014-09-25 22:22:48 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2014-09-25 22:22:48 +0000 |
commit | 0a8534f083b0ef6712369d449f7c305eb73081dc (patch) | |
tree | eeb366af442e00f7affef28afdbd329e922f59e2 /contrib/hyperv/tools | |
parent | be930504becc794c808b529bd65fa09d2d85f846 (diff) | |
download | src-0a8534f083b0ef6712369d449f7c305eb73081dc.tar.gz src-0a8534f083b0ef6712369d449f7c305eb73081dc.zip |
Notes
Diffstat (limited to 'contrib/hyperv/tools')
-rw-r--r-- | contrib/hyperv/tools/hv_kvp_daemon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/hyperv/tools/hv_kvp_daemon.c b/contrib/hyperv/tools/hv_kvp_daemon.c index 6e1acbe9740b..eafc867b0bd0 100644 --- a/contrib/hyperv/tools/hv_kvp_daemon.c +++ b/contrib/hyperv/tools/hv_kvp_daemon.c @@ -305,11 +305,13 @@ kvp_file_init(void) filep = fopen(fname, "r"); if (!filep) { + close(fd); return (1); } record = malloc(alloc_unit * num_blocks); if (record == NULL) { + close(fd); fclose(filep); return (1); } @@ -334,6 +336,7 @@ kvp_file_init(void) record = realloc(record, alloc_unit * num_blocks); if (record == NULL) { + close(fd); fclose(filep); return (1); } |