changeset 35259:7e835c67cf86

Fix malloc failure check to check the correct variable.
author reimar
date Mon, 05 Nov 2012 21:23:46 +0000
parents 109f7c33a9b6
children b1b262fe38a4
files sub/subreader.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sub/subreader.c	Mon Nov 05 21:22:14 2012 +0000
+++ b/sub/subreader.c	Mon Nov 05 21:23:46 2012 +0000
@@ -274,7 +274,7 @@
     }
 
     *dest= malloc (len+1);
-    if (!dest) {return ERR;}
+    if (!*dest) {return ERR;}
 
     strncpy(*dest, source, len);
     (*dest)[len]=0;