Citeren Frederic BOHE <[email protected]>:

--- branches/windows_port/scripts/Windows/wininit.c Tue Jan 18 08:57:03 2011 (r2838) +++ branches/windows_port/scripts/Windows/wininit.c Tue Jan 18 10:05:01 2011 (r2839)
@@ -285,8 +285,11 @@
        char    fn[SMALLBUF];
        FILE    *nutf;
        char    buf[SMALLBUF];
+       const char * conf_path;

-       snprintf(fn,sizeof(fn),"%s/nut.conf",CONFPATH);
+       conf_path = confpath();
+       snprintf(fn,sizeof(fn),"%s/nut.conf",conf_path);
+       free(conf_path);

This won't work. You can't free() conf_path here, since it is not dynamically allocated. Use

        snprintf(fn, sizeof(fn), "%s/nut.conf", confpath());

instead.

Best regards, Arjen
--
Please keep list traffic on the list (off-list replies will be rejected)


_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to