mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
_alpm_split_backup: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
c6dd581ec5
commit
123ecb8e07
@ -47,11 +47,10 @@ int _alpm_split_backup(const char *string, alpm_backup_t **backup)
|
||||
*ptr = '\0';
|
||||
ptr++;
|
||||
/* now str points to the filename and ptr points to the hash */
|
||||
STRDUP((*backup)->name, str, return -1);
|
||||
STRDUP((*backup)->hash, ptr, return -1);
|
||||
STRDUP((*backup)->name, str, FREE(str); return -1);
|
||||
STRDUP((*backup)->hash, ptr, FREE(str); return -1);
|
||||
FREE(str);
|
||||
return 0;
|
||||
}
|
||||
return 0;}
|
||||
|
||||
/* Look for a filename in a alpm_pkg_t.backup list. If we find it,
|
||||
* then we return the full backup entry.
|
||||
|
Loading…
Reference in New Issue
Block a user