]> granicus.if.org Git - file/commitdiff
handle error properly.
authorChristos Zoulas <christos@zoulas.com>
Sun, 19 Aug 2018 10:38:21 +0000 (10:38 +0000)
committerChristos Zoulas <christos@zoulas.com>
Sun, 19 Aug 2018 10:38:21 +0000 (10:38 +0000)
src/readcdf.c

index eb7433b90e500ba6389530895c24a57244ff9f5f..0305906efa5f9ba054ac49729d1f28e2835f98df 100644 (file)
@@ -26,7 +26,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: readcdf.c,v 1.68 2018/07/25 07:16:21 christos Exp $")
+FILE_RCSID("@(#)$File: readcdf.c,v 1.69 2018/08/19 10:38:21 christos Exp $")
 #endif
 
 #include <assert.h>
@@ -661,8 +661,10 @@ out2:
 out1:
        free(sat.sat_tab);
 out0:
-       if (i == -1)
+       /* If we handled it already, return */
+       if (i != -1)
                return i;
+       /* Provide a default handler */
        if (NOTMIME(ms)) {
                if (file_printf(ms,
                    "Composite Document File V2 Document") == -1)