mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
fix calloc() calls
* size_t nmemb (number of elements) first, then size_t size * do not assume char is size 1 but use sizeof() * allocate for char, not pointer to char (found by Michael McConville, fixes #261)
This commit is contained in:
@ -17,7 +17,7 @@ in the source distribution for its full text.
|
||||
}*/
|
||||
|
||||
Process* UnsupportedProcess_new(Settings* settings) {
|
||||
Process* this = calloc(sizeof(Process), 1);
|
||||
Process* this = calloc(1, sizeof(Process));
|
||||
Object_setClass(this, Class(Process));
|
||||
Process_init(this, settings);
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user