svn commit: r302965 - head/sys/contrib/libnv

Mariusz Zaborski oshogbo at FreeBSD.org
Sun Jul 17 15:29:32 UTC 2016


Author: oshogbo
Date: Sun Jul 17 15:29:31 2016
New Revision: 302965
URL: https://svnweb.freebsd.org/changeset/base/302965

Log:
  Fix memory leak in the nvlist string array.
  
  Submitted by:	Adam Starak <starak.adam at gmail.com>
  MFC after:	1 week

Modified:
  head/sys/contrib/libnv/nvpair.c

Modified: head/sys/contrib/libnv/nvpair.c
==============================================================================
--- head/sys/contrib/libnv/nvpair.c	Sun Jul 17 15:23:32 2016	(r302964)
+++ head/sys/contrib/libnv/nvpair.c	Sun Jul 17 15:29:31 2016	(r302965)
@@ -1945,6 +1945,7 @@ nvpair_free(nvpair_t *nvp)
 	case NV_TYPE_STRING_ARRAY:
 		for (i = 0; i < nvp->nvp_nitems; i++)
 			nv_free(((char **)(intptr_t)nvp->nvp_data)[i]);
+		nv_free((char **)(intptr_t)nvp->nvp_data);
 		break;
 	}
 	nv_free(nvp);


More information about the svn-src-head mailing list