Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2005 13:21:30 +0200
From:      "Daan Vreeken [PA4DAN]" <Danovitsch@Vitsch.net>
To:        Poul-Henning Kamp <phk@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/usr.sbin/boot0cfg Makefile boot0cfg.c
Message-ID:  <200508171321.31251.Danovitsch@Vitsch.net>
In-Reply-To: <200508162245.j7GMjXkg034781@repoman.freebsd.org>
References:  <200508162245.j7GMjXkg034781@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 17 August 2005 00:45, Poul-Henning Kamp wrote:
> phk         2005-08-16 22:45:33 UTC
>
>   FreeBSD src repository
>
>   Modified files:        (Branch: RELENG_6)
>     usr.sbin/boot0cfg    Makefile boot0cfg.c
>   Log:
>   MFC:    use g_ctl for modifying metadata if possible.
Doesn't this change miss a call to gctl_free() in the case gctl_issue() 
returns NULL?

Supposed fix :
============== BEGIN =============
--- boot0cfg.c.org      Wed Aug 17 00:45:33 2005
+++ boot0cfg.c  Wed Aug 17 13:16:39 2005
@@ -282,8 +282,10 @@
     gctl_ro_param(grq, "geom", -1, q);
     gctl_ro_param(grq, "data", mbr_size, mbr);
     q = gctl_issue(grq);
-    if (q == NULL)
+    if (q == NULL) {
+       gctl_free(grq);
        return;
+    }
 
     warnx("%s: %s", fname, q);
     gctl_free(grq);
=============== END ============

>   Approved by:    re@
>
>   Revision  Changes    Path
>   1.8.12.1  +3 -0      src/usr.sbin/boot0cfg/Makefile
>   1.19.2.1  +22 -1     src/usr.sbin/boot0cfg/boot0cfg.c
> _______________________________________________
> cvs-src@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/cvs-src
> To unsubscribe, send any mail to "cvs-src-unsubscribe@freebsd.org"

grtz,
Daan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508171321.31251.Danovitsch>