- replace all the xmalloc crap by glib memory management functions
This commit is contained in:
@@ -61,7 +61,7 @@ glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
|
||||
break;
|
||||
if(max_len)
|
||||
{
|
||||
ret = glibtop_malloc_r(server, max_len + 1);
|
||||
ret = g_malloc(server, max_len + 1);
|
||||
if(max_len < len)
|
||||
len = max_len;
|
||||
memcpy(ret, pinfo.pr_psargs, len);
|
||||
@@ -69,7 +69,7 @@ glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = glibtop_malloc_r(server, len + 1);
|
||||
ret = g_malloc(server, len + 1);
|
||||
memcpy(ret, pinfo.pr_psargs, len);
|
||||
ret[len] = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user