Eliminate bunch of obvious dead NULL-assignments around librpmio
This commit is contained in:
parent
f1c46157fb
commit
182e9f8a64
|
@ -1603,7 +1603,7 @@ rpmExpandNumeric(const char *arg)
|
|||
if (!(end && *end == '\0'))
|
||||
rc = 0;
|
||||
}
|
||||
val = _free(val);
|
||||
free(val);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -528,9 +528,9 @@ char * rpmGenPath(const char * urlroot, const char * urlmdir,
|
|||
|
||||
result = rpmGetPath(url, root, "/", mdir, "/", file, NULL);
|
||||
|
||||
xroot = _free(xroot);
|
||||
xmdir = _free(xmdir);
|
||||
xfile = _free(xfile);
|
||||
free(xroot);
|
||||
free(xmdir);
|
||||
free(xfile);
|
||||
free(url);
|
||||
return result;
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ int rpmGlob(const char * patterns, int * argcPtr, ARGV_t * argvPtr)
|
|||
argvAdd(&argv, globURL);
|
||||
}
|
||||
globfree(&gl);
|
||||
globURL = _free(globURL);
|
||||
free(globURL);
|
||||
}
|
||||
|
||||
argc = argvCount(argv);
|
||||
|
@ -669,11 +669,11 @@ exit:
|
|||
#ifdef ENABLE_NLS
|
||||
if (old_collate) {
|
||||
(void) setlocale(LC_COLLATE, old_collate);
|
||||
old_collate = _free(old_collate);
|
||||
free(old_collate);
|
||||
}
|
||||
if (old_ctype) {
|
||||
(void) setlocale(LC_CTYPE, old_ctype);
|
||||
old_ctype = _free(old_ctype);
|
||||
free(old_ctype);
|
||||
}
|
||||
#endif
|
||||
av = _free(av);
|
||||
|
|
|
@ -111,7 +111,6 @@ int urlGetFile(const char * url, const char * dest)
|
|||
/* XXX TODO: sanity checks like target == dest... */
|
||||
|
||||
rasprintf(&cmd, "%s %s %s", urlhelper, target, url);
|
||||
urlhelper = _free(urlhelper);
|
||||
|
||||
if ((pid = fork()) == 0) {
|
||||
ARGV_t argv = NULL;
|
||||
|
@ -120,6 +119,7 @@ int urlGetFile(const char * url, const char * dest)
|
|||
exit(127); /* exit with 127 for compatibility with bash(1) */
|
||||
}
|
||||
free(cmd);
|
||||
free(urlhelper);
|
||||
|
||||
return ((waitpid(pid, &status, 0) != -1) &&
|
||||
WIFEXITED(status) && (WEXITSTATUS(status) == 0)) ? 0 : -1;
|
||||
|
|
Loading…
Reference in New Issue