Bernhard Fischer says: use xmalloc() instead of malloc()

This commit is contained in:
Mike Frysinger
2005-08-16 05:32:42 +00:00
parent 71224980e1
commit 1eef0c4571
3 changed files with 3 additions and 3 deletions

View File

@@ -1299,7 +1299,7 @@ static char **all_control_list(const char *package_name)
char **remove_files;
/* Create a list of all /var/lib/dpkg/info/<package> files */
remove_files = malloc(sizeof(all_control_files));
remove_files = xmalloc(sizeof(all_control_files));
while (all_control_files[i]) {
remove_files[i] = xmalloc(strlen(package_name) + strlen(all_control_files[i]) + 21);
sprintf(remove_files[i], "/var/lib/dpkg/info/%s.%s", package_name, all_control_files[i]);