From 18b631ed12e45e41bbb7fdd1221f73c49365efea Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 17 Mar 2007 18:04:16 +0000 Subject: [PATCH] Fixed error code when a memory allocation error occured --- src/cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cp.c b/src/cp.c index af0994e..18ca4c3 100644 --- a/src/cp.c +++ b/src/cp.c @@ -196,7 +196,7 @@ static int _cp_multiple(Prefs * prefs, int filec, char * const filev[]) len = strlen(filev[i]) + strlen(dst) + 2; if((p = realloc(sdst, len * sizeof(char))) == NULL) { - _cp_error(filev[filec - 1], 0); + ret |= _cp_error(filev[filec - 1], 1); continue; } sdst = p;