Module Name: src
Committed By: martin
Date: Sun Aug 18 11:08:57 UTC 2019
Modified Files:
src/sbin/fsck: partutil.c
Log Message:
Properly release the disk properties dictionary we received via
ioctl.
Detected by leak sanitizer when building with MKSANITIZER=yes.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck/partutil.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/fsck/partutil.c
diff -u src/sbin/fsck/partutil.c:1.15 src/sbin/fsck/partutil.c:1.16
--- src/sbin/fsck/partutil.c:1.15 Wed Jun 3 17:53:23 2015
+++ src/sbin/fsck/partutil.c Sun Aug 18 11:08:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: partutil.c,v 1.15 2015/06/03 17:53:23 martin Exp $ */
+/* $NetBSD: partutil.c,v 1.16 2019/08/18 11:08:56 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: partutil.c,v 1.15 2015/06/03 17:53:23 martin Exp $");
+__RCSID("$NetBSD: partutil.c,v 1.16 2019/08/18 11:08:56 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -131,6 +131,8 @@ getdiskinfo(const char *s, int fd, const
geom_dict = prop_dictionary_get(disk_dict, "geometry");
dict2geom(geo, geom_dict);
}
+ if (disk_dict != NULL)
+ prop_object_release(disk_dict);
if (dkw == NULL)
return 0;