mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
- Fix two possible memory leaks by freeing resources
- Patch by Daniel Zimmermann, <netzimme AT aim DOT com> - Bug #3911, CIDs 607 and 608 svn path=/trunk/; revision=37744
This commit is contained in:
parent
0f123895c2
commit
4de7f1ccff
|
@ -83,6 +83,7 @@ INT stop_service(CHAR *service)
|
|||
row = (CHAR *) malloc(row_size*sizeof(CHAR));
|
||||
if (row == NULL)
|
||||
{
|
||||
free(srvlst);
|
||||
return 0;
|
||||
}
|
||||
memset(row,0,row_size*sizeof(CHAR));
|
||||
|
|
|
@ -83,6 +83,7 @@ INT start_service(CHAR *service)
|
|||
row = (CHAR *) malloc(row_size*sizeof(CHAR));
|
||||
if (row == NULL)
|
||||
{
|
||||
free(srvlst);
|
||||
return 0;
|
||||
}
|
||||
memset(row,0,row_size*sizeof(CHAR));
|
||||
|
|
Loading…
Reference in a new issue