Author: delphij Date: Thu Sep 25 22:22:48 2014 New Revision: 272140 URL: http://svnweb.freebsd.org/changeset/base/272140
Log: Plug a file descriptor leak. Reported by: Coverity CID: 1238916 MFC after: 1 week Modified: head/contrib/hyperv/tools/hv_kvp_daemon.c Modified: head/contrib/hyperv/tools/hv_kvp_daemon.c ============================================================================== --- head/contrib/hyperv/tools/hv_kvp_daemon.c Thu Sep 25 22:22:43 2014 (r272139) +++ head/contrib/hyperv/tools/hv_kvp_daemon.c Thu Sep 25 22:22:48 2014 (r272140) @@ -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); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"