Commit cec1caf0 authored by Federico Vaga's avatar Federico Vaga

wrtd:tools: fix lswrnc, check pointer before use it

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 3341a77e
......@@ -51,6 +51,8 @@ int main(int argc, char *argv[])
}
list = wrnc_list();
if (!list)
goto out;
for (i = 0; list[i]; ++i) {
fprintf(stdout, "%s\n" , list[i]);
wrnc = wrnc_open(list[i]);
......@@ -68,6 +70,6 @@ int main(int argc, char *argv[])
wrnc_close(wrnc);
}
wrnc_list_free(list);
out:
exit(0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment