Fixed a stupid bug; malloc() was called with the wrong size - always use the "struct"
keyword in sizeof(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8148 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3ae79102aa
commit
8ed11b38dc
@ -87,7 +87,7 @@ register_kernel_daemon(daemon_hook function, void *arg, int frequency)
|
|||||||
if (function == NULL || frequency < 1)
|
if (function == NULL || frequency < 1)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
daemon = malloc(sizeof(daemon));
|
daemon = malloc(sizeof(struct daemon));
|
||||||
if (daemon == NULL)
|
if (daemon == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user