# HG changeset patch # User meillo@marmaro.de # Date 1273139440 -7200 # Node ID 3654c502a4dffa5a8d2839b273525aa37122afd4 # Parent 607221b0dac1929a36ead321a3c84d8f47978cc5 g_malloc terminates the program on failure automatically diff -r 607221b0dac1 -r 3654c502a4df src/peopen.c --- a/src/peopen.c Thu May 06 11:44:43 2010 +0200 +++ b/src/peopen.c Thu May 06 11:50:40 2010 +0200 @@ -33,8 +33,7 @@ const char *p; int i = 0; - arr = (char **) malloc(sizeof(char *) * count); - /* FIXME: check return value of malloc() */ + arr = (char **) g_malloc(sizeof(char *) * count); p = cmd; while (*p && i < (count - 1)) { diff -r 607221b0dac1 -r 3654c502a4df src/readsock.c --- a/src/readsock.c Thu May 06 11:44:43 2010 +0200 +++ b/src/readsock.c Thu May 06 11:50:40 2010 +0200 @@ -149,7 +149,7 @@ } if (!*pbuf) - *pbuf = malloc(size); + *pbuf = g_malloc(size); buf = *pbuf; while (1) {