← Commit list

1df0af767

Alexey Fomenko
Alexey Fomenko
2011-03-02
FAILED Duration: 225s

Subject

don't leak malloced variables in the loop; remove double alloc

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ifupdown.c+5 -2
@@ -1220,13 +1220,13 @@ int ifupdown_main(int argc UNUSED_PARAM, char **argv)
/* ifup */
if (iface_state) {
bb_error_msg("interface %s already configured", iface);
- continue;
+ goto next;
}
} else {
/* ifdown */
if (!iface_state) {
bb_error_msg("interface %s not configured", iface);
- continue;
+ goto next;
}
}
llist_free(state_list, free);
@@ -1316,6 +1316,9 @@ int ifupdown_main(int argc UNUSED_PARAM, char **argv)
fclose(state_fp);
llist_free(state_list, free);
}
+ next:
+ free(iface);
+ free(liface);
}
return any_failures;
networking/nameif.c+1 -1
@@ -156,7 +156,7 @@ int nameif_main(int argc, char **argv)
if (argc) {
while (*argv) {
- char *ifname = xstrdup(*argv++);
+ char *ifname = *argv++;
prepend_new_eth_table(&clist, ifname, *argv++);
}
} else {