Commit b54d2dde authored by Hisham's avatar Hisham
Browse files

Check for failure in allocations.

parent a1f7f286
...@@ -17,7 +17,7 @@ in the source distribution for its full text. ...@@ -17,7 +17,7 @@ in the source distribution for its full text.
}*/ }*/
Process* UnsupportedProcess_new(Settings* settings) { Process* UnsupportedProcess_new(Settings* settings) {
Process* this = calloc(1, sizeof(Process)); Process* this = xCalloc(1, sizeof(Process));
Object_setClass(this, Class(Process)); Object_setClass(this, Class(Process));
Process_init(this, settings); Process_init(this, settings);
return this; return this;
......
...@@ -16,7 +16,7 @@ in the source distribution for its full text. ...@@ -16,7 +16,7 @@ in the source distribution for its full text.
}*/ }*/
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) { ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) {
ProcessList* this = calloc(1, sizeof(ProcessList)); ProcessList* this = xCalloc(1, sizeof(ProcessList));
ProcessList_init(this, Class(Process), usersTable, pidWhiteList, userId); ProcessList_init(this, Class(Process), usersTable, pidWhiteList, userId);
return this; return this;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment