Integrate review comments from Julien Cristau
* libmisc/copydir.c: Missing parenthesis in comment. * libmisc/chowndir.c: Fixed memory leak on failed realloc(). * libmisc/chowndir.c: Make sure the buffer for the path is large enough. * libmisc/remove_tree.c: Remove check for NULL before free().
This commit is contained in:
@@ -88,9 +88,7 @@ int remove_tree (const char *root, bool remove_root)
|
||||
* Make the filename for the current entry.
|
||||
*/
|
||||
|
||||
if (NULL != new_name) {
|
||||
free (new_name);
|
||||
}
|
||||
free (new_name);
|
||||
new_name = (char *) malloc (new_len);
|
||||
if (NULL == new_name) {
|
||||
err = -1;
|
||||
|
||||
Reference in New Issue
Block a user