Re: svn commit: r344235 - head/sys/contrib/libnv

2019-02-17 Thread O. Hartmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Am Sun, 17 Feb 2019 18:26:27 + (UTC)
Mariusz Zaborski  schrieb:

> Author: oshogbo
> Date: Sun Feb 17 18:26:27 2019
> New Revision: 344235
> URL: https://svnweb.freebsd.org/changeset/base/344235
> 
> Log:
>   libnv: fix double free
>   
>   In r343986 we introduced a double free. The structure was already
>   freed fixed in the r302966. This problem was introduced
>   because the GitHub version was out of sync with the FreeBSD one.
>   
>   Submitted by:   Mindaugas Rasiukevicius 
>   MFC with:   r343986
> 
> Modified:
>   head/sys/contrib/libnv/nvpair.c
> 
> Modified: head/sys/contrib/libnv/nvpair.c
> ==
> --- head/sys/contrib/libnv/nvpair.c   Sun Feb 17 17:47:08 2019
> (r344234)
> +++ head/sys/contrib/libnv/nvpair.c   Sun Feb 17 18:26:27 2019
> (r344235)
> @@ -229,14 +229,6 @@ nvpair_remove_nvlist_array(nvpair_t *nvp)
>   nvlarray = __DECONST(nvlist_t **,
>   nvpair_get_nvlist_array(nvp, ));
>   for (i = 0; i < count; i++) {
> - nvlist_t *nvl;
> - nvpair_t *nnvp;
> -
> - nvl = nvlarray[i];
> - nnvp = nvlist_get_array_next_nvpair(nvl);
> - if (nnvp != NULL) {
> - nvpair_free_structure(nnvp);
> - }
>   nvlist_set_array_next(nvl, NULL);
>   nvlist_set_parent(nvl, NULL);
>   }
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


This commit breaks buildworld:
[...]

mkdir -p "/usr/obj/usr/src/amd64.amd64/tmp/legacy//usr/include/sys"
===> lib/libnv (obj,includes,all,install)
Building /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/libnv/nvpair.o
- --- nvpair.o ---
/usr/src/sys/contrib/libnv/nvpair.c:232:25: error: use of undeclared identifier 
'nvl'; did you
mean 'nvp'? nvlist_set_array_next(nvl, NULL);
  ^~~

- -- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-BEGIN PGP SIGNATURE-

iHUEARYIAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCXGmo8AAKCRA4N1ZZPba5
R1dYAQDJei3rxxtdliTK13kRTlGsPvG+XM2xMJPhvIcBdU+k2AD8DT3KCVuMjguG
WPFVXelVaAwIE/05ElVNg1FRoXGW8Qs=
=trVK
-END PGP SIGNATURE-
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2019-02-17 Thread Mariusz Zaborski
Author: oshogbo
Date: Sun Feb 17 18:26:27 2019
New Revision: 344235
URL: https://svnweb.freebsd.org/changeset/base/344235

Log:
  libnv: fix double free
  
  In r343986 we introduced a double free. The structure was already
  freed fixed in the r302966. This problem was introduced
  because the GitHub version was out of sync with the FreeBSD one.
  
  Submitted by: Mindaugas Rasiukevicius 
  MFC with: r343986

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

Modified: head/sys/contrib/libnv/nvpair.c
==
--- head/sys/contrib/libnv/nvpair.c Sun Feb 17 17:47:08 2019
(r344234)
+++ head/sys/contrib/libnv/nvpair.c Sun Feb 17 18:26:27 2019
(r344235)
@@ -229,14 +229,6 @@ nvpair_remove_nvlist_array(nvpair_t *nvp)
nvlarray = __DECONST(nvlist_t **,
nvpair_get_nvlist_array(nvp, ));
for (i = 0; i < count; i++) {
-   nvlist_t *nvl;
-   nvpair_t *nnvp;
-
-   nvl = nvlarray[i];
-   nnvp = nvlist_get_array_next_nvpair(nvl);
-   if (nnvp != NULL) {
-   nvpair_free_structure(nnvp);
-   }
nvlist_set_array_next(nvl, NULL);
nvlist_set_parent(nvl, NULL);
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"