Commit 14179ae0 authored by Jonathan Jenkins's avatar Jonathan Jenkins
Browse files

prevent null ptr deref on bad file argument

parent e2dc6ae6
......@@ -129,7 +129,7 @@ fini:
free(rdbuf);
free(addr_strs);
free(buf);
if (s->addrs == NULL) { free(s); s = NULL; }
if (s != NULL && s->addrs == NULL) { free(s); s = NULL; }
return s;
}
......
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