]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix prior
authorRoy Marples <roy@marples.name>
Mon, 22 Jul 2019 10:38:10 +0000 (11:38 +0100)
committerRoy Marples <roy@marples.name>
Mon, 22 Jul 2019 10:38:10 +0000 (11:38 +0100)
src/if-options.c

index 409c56a33cd0622dd9551aeda243e43a0d47f661..d880e0e34b7144878ac66f0b41b536e49080c247 100644 (file)
@@ -719,6 +719,9 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
                if (s == 0) {
                        ifo->script = NULL;
                        break;
+               } else if (s == -1) {
+                       logerr("%s: script", __func__);
+                       return -1;
                }
                dl = (size_t)s;
                if (s == -1 || (ifo->script = malloc(dl)) == NULL) {
@@ -1868,7 +1871,7 @@ err_sla:
                    ifo->vivco_len + 1, sizeof(*ifo->vivco));
                if (vivco == NULL) {
                        logerr( __func__);
-                       fre(np);
+                       free(np);
                        return -1;
                }
                ifo->vivco = vivco;