mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 13:13:00 +00:00
[CMD] Add missing memory allocation NULL checks (#161). CORE-8304
Adapted from a patch by Jacob S. Preciado. Bring also the code suggestions emitted during review.
This commit is contained in:
parent
73798d2e71
commit
3f892a8d6b
16 changed files with 293 additions and 147 deletions
|
@ -37,7 +37,8 @@ PushDirectory (LPTSTR pszPath)
|
|||
LPDIRENTRY lpDir = cmd_alloc(FIELD_OFFSET(DIRENTRY, szPath[_tcslen(pszPath) + 1]));
|
||||
if (!lpDir)
|
||||
{
|
||||
error_out_of_memory ();
|
||||
WARN("Cannot allocate memory for lpDir\n");
|
||||
error_out_of_memory();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue