No need to cast malloc() return value.

This commit is contained in:
Todd C. Miller
2015-05-14 10:47:09 -06:00
parent c75eb5bf0d
commit cbcaaa299a
7 changed files with 10 additions and 11 deletions

View File

@@ -286,7 +286,7 @@ find_editor(int nfiles, char * const files[], char **argv_out[])
}
if (editor_path != editor)
free(editor);
nargv = (char **) malloc((nargc + 1 + nfiles + 1) * sizeof(char *));
nargv = malloc((nargc + 1 + nfiles + 1) * sizeof(char *));
if (nargv == NULL) {
sudo_log(SUDO_CONV_ERROR_MSG, "unable to allocate memory\n");
free(editor_path);