Don't check for null pointer in calls to free

According to the C99 specification section 7.20.3.2 paragraph 2:

> If ptr is a null pointer, no action occurs.

So we do not need to check that the pointer is a null pointer.
This commit is contained in:
Peter Zhu 2023-06-29 16:31:35 -04:00
parent 37a893d129
commit 58386814a7
Notes: git 2023-06-30 13:13:49 +00:00
16 changed files with 70 additions and 108 deletions

View file

@ -75,7 +75,7 @@ dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size
".";
}
buf = dln_find_1(fname, path, buf, size, 1 DLN_FIND_EXTRA_ARG);
if (envpath) free(envpath);
free(envpath);
return buf;
}