wmappkill: Use g_free from glib instead of glibtop_free.

gliptop_free no longer exists.
This commit is contained in:
Doug Torrance 2017-02-27 22:22:06 -05:00 committed by Carlos R. Mafra
parent 37712e08b0
commit 438f06672f

View file

@ -38,7 +38,6 @@
#include <glibtop.h> #include <glibtop.h>
#include <glibtop/proclist.h> #include <glibtop/proclist.h>
#include <glibtop/procstate.h> #include <glibtop/procstate.h>
#include <glibtop/xmalloc.h>
#include <time.h> #include <time.h>
#include <signal.h> #include <signal.h>
@ -123,11 +122,11 @@ int CheckProc(pid_t pid)
unsigned int *n; unsigned int *n;
if ((n = glibtop_get_proclist (&bof, GLIBTOP_KERN_PROC_PID , (int64_t)pid)) == NULL) { if ((n = glibtop_get_proclist (&bof, GLIBTOP_KERN_PROC_PID , (int64_t)pid)) == NULL) {
glibtop_free(n); g_free(n);
return -1; return -1;
} }
glibtop_free(n); g_free(n);
return 0; return 0;
} }
@ -175,7 +174,7 @@ _desc *GetProcList(void) /* create a double linked list */
lastOne -> next = NULL; lastOne -> next = NULL;
lastProcPid = n[nbPr - 1]; lastProcPid = n[nbPr - 1];
glibtop_free(n); g_free(n);
if (procBaseName && i) gNbProc = nbPr - i + 1; /* procBase has been found */ if (procBaseName && i) gNbProc = nbPr - i + 1; /* procBase has been found */
else { /* procBaseName is null or hasn't been found */ else { /* procBaseName is null or hasn't been found */
@ -273,7 +272,7 @@ int CheckProcChange(void)
if (diffNbProc == 0 && (n[nbPr - 1] == lastProcPid)){ /* only changes before baseproc */ if (diffNbProc == 0 && (n[nbPr - 1] == lastProcPid)){ /* only changes before baseproc */
gNbProcTotal = nbPr; gNbProcTotal = nbPr;
glibtop_free(n); g_free(n);
return 0; return 0;
} }
@ -287,7 +286,7 @@ int CheckProcChange(void)
CheckProcToAdd(nbPr - diffNbProc - 1, n, nbPr); CheckProcToAdd(nbPr - diffNbProc - 1, n, nbPr);
} }
glibtop_free(n); g_free(n);
return 1; return 1;
} }