diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2019-08-18 13:31:21 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2019-08-18 13:31:21 +0000 |
| commit | 1cc5081df3f4851c98c9d0b248b789f976bf3ffe (patch) | |
| tree | 7560a6794f7b6042efda48ca0ff442321bf8ce6c /sbin | |
| parent | e9512db86e36cef206e7d790e6f3faea67512cfe (diff) | |
Pull up following revision(s) (requested by martin in ticket #88):
sbin/fsck/partutil.c: revision 1.16
Properly release the disk properties dictionary we received via
ioctl.
Detected by leak sanitizer when building with MKSANITIZER=yes.
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/fsck/partutil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/fsck/partutil.c b/sbin/fsck/partutil.c index 3b57399cf07..327eff6e632 100644 --- a/sbin/fsck/partutil.c +++ b/sbin/fsck/partutil.c @@ -1,4 +1,4 @@ -/* $NetBSD: partutil.c,v 1.15 2015/06/03 17:53:23 martin Exp $ */ +/* $NetBSD: partutil.c,v 1.15.18.1 2019/08/18 13:31:21 msaitoh 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.15.18.1 2019/08/18 13:31:21 msaitoh Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -131,6 +131,8 @@ getdiskinfo(const char *s, int fd, const char *dt, struct disk_geom *geo, 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; |
