Used g_memdup.

* proclist.c: (glibtop_get_proclist_s): Used g_memdup.
This commit is contained in:
Benoît Dejean
2004-06-06 21:59:59 +00:00
parent d8cb4ccdf7
commit 31e8abe019
2 changed files with 5 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
2004-06-06 Benoît Dejean <tazforever@dlfp.org>
* proclist.c: (glibtop_get_proclist_s): Used g_memdup.
2004-05-25 Benoît Dejean <tazforever@dlfp.org>
* sem_limits.c:

View File

@@ -77,9 +77,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
buf->total = buf->number * sizeof (unsigned);
pids_chain = g_malloc (buf->total);
memcpy (pids_chain, tbl.proclist.pids, buf->total);
pids_chain = g_memdup(tbl.proclist.pids, buf->total);
return pids_chain;
}