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:
nekral-guest
2010-09-05 15:34:42 +00:00
parent d1bad25f40
commit dffc624b37
4 changed files with 18 additions and 8 deletions

View File

@@ -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;