Skip to content

Commit 4d2b6f5

Browse files
author
Keyur Govande
committed
Reset everything when memory alloc fails
1 parent 028dd66 commit 4d2b6f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sapi/cli/ps_title.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ char** save_ps_args(int argc, char** argv)
252252
* if we ever get here, argv still points to originally passed
253253
* in argument
254254
*/
255+
save_argv = NULL;
256+
save_argc = 0;
255257
ps_buffer = NULL;
256258
ps_buffer_size = 0;
257259
return argv;

0 commit comments

Comments
 (0)