if an invalid 'table' is given the function returns without freeing 'ifaceidin'
postpone the initialization
found by Coverity
listinfo->count = 0;
- ifaceidin = db_getinterfaceidin(iface);
- if (ifaceidin == NULL) {
- return 0;
- }
-
ret = 0;
for (i = 0; i < 6; i++) {
if (strcmp(table, datatables[i]) == 0) {
return 0;
}
+ ifaceidin = db_getinterfaceidin(iface);
+ if (ifaceidin == NULL) {
+ return 0;
+ }
+
dbegin[0] = '\0';
if (strlen(databegin)) {
snprintf(dbegin, 32, "and date >= '%s'", databegin);