cvs commit: src/usr.sbin/boot0cfg Makefile boot0cfg.c

Daan Vreeken [PA4DAN] Danovitsch at Vitsch.net
Wed Aug 17 11:22:06 GMT 2005


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/cvs-src
> To unsubscribe, send any mail to "cvs-src-unsubscribe at freebsd.org"

grtz,
Daan


More information about the cvs-src mailing list