mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-12 17:48:33 +00:00
Fix CID 1135015
This commit is contained in:
parent
532fda4d08
commit
8c3d75c62d
@ -262,8 +262,10 @@ R_API int r_fs_dir_dump (RFS* fs, const char *path, const char *name) {
|
|||||||
strcat (str, "/");
|
strcat (str, "/");
|
||||||
strcat (str, file->name);
|
strcat (str, file->name);
|
||||||
npath = malloc (strlen (path) + strlen (file->name) + 2);
|
npath = malloc (strlen (path) + strlen (file->name) + 2);
|
||||||
if (!npath)
|
if (!npath) {
|
||||||
|
free (str);
|
||||||
return R_FALSE;
|
return R_FALSE;
|
||||||
|
}
|
||||||
strcpy (npath, path);
|
strcpy (npath, path);
|
||||||
strcat (npath, "/");
|
strcat (npath, "/");
|
||||||
strcat (npath, file->name);
|
strcat (npath, file->name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user