* lib/tcbfuncs.c: Avoid implicit conversion of pointers or
integers to booleans.
* lib/tcbfuncs.c: Avoid assignments in comparisons.
+ * lib/tcbfuncs.c: Do not free path before its last use.
2010-03-17 Nicolas François <nicolas.francois@centraliens.net>
return NULL;
}
ret = readlink(path, link, sizeof(link) - 1);
- free(path);
if (ret == -1) {
fprintf(stderr, _("%s: Cannot read symbolic link %s: %s\n"), Prog, path, strerror(errno));
+ free(path);
return NULL;
}
+ free(path);
if (ret >= sizeof(link) - 1) {
link[sizeof(link) - 1] = '\0';
fprintf(stderr, _("%s: Suspiciously long symlink: %s\n"), Prog, link);