]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix a silly bug made by previous change.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 19 May 2011 05:22:21 +0000 (01:22 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 19 May 2011 05:22:21 +0000 (01:22 -0400)
SVN-Revision: 3369

libarchive/archive_read_support_format_iso9660.c

index e5abed2cc5437a76558a3a1ac05642c93edf9694..40d136f239826e56548cb7f9d4a9a8491ab698ef 100644 (file)
@@ -1269,7 +1269,7 @@ archive_read_format_iso9660_read_header(struct archive_read *a,
                }
                if (iso9660->utf16be_path == NULL) {
                        iso9660->utf16be_path = malloc(UTF16_NAME_MAX);
-                       if (iso9660->utf16be_path) {
+                       if (iso9660->utf16be_path == NULL) {
                                archive_set_error(&a->archive, ENOMEM,
                                    "No memory");
                                return (ARCHIVE_FATAL);
@@ -1277,7 +1277,7 @@ archive_read_format_iso9660_read_header(struct archive_read *a,
                }
                if (iso9660->utf16be_previous_path == NULL) {
                        iso9660->utf16be_previous_path = malloc(UTF16_NAME_MAX);
-                       if (iso9660->utf16be_previous_path) {
+                       if (iso9660->utf16be_previous_path == NULL) {
                                archive_set_error(&a->archive, ENOMEM,
                                    "No memory");
                                return (ARCHIVE_FATAL);