malint: repository: changeset 694d56f91360

Navigation

Views: changelog, tags, manifest, raw zip, gz, bz2,

Avoid memory leak in error cases.

changeset 130: 694d56f91360
parent 129:0a738a8eb680
child 131:f0287863e27b
author: Dieter Baron <dillo@nih.at>
date: Mon Aug 13 18:40:52 2007 +0200 (3 years ago)
files: id3.c
description: Avoid memory leak in error cases.
--- a/id3.c	Mon Aug 13 18:37:58 2007 +0200
+++ b/id3.c	Mon Aug 13 18:40:52 2007 +0200
@@ -367,14 +367,14 @@ process_tag_34(const unsigned char *tag,
 	    printf("   %s:\t", __tags[i+2]);
 	    if (data[0] > ID3_ENCODING_MAX) {
 		printf("[unknown encoding %d]\n", data[0]);
-		return;
+		break;
 	    }
 
 	    codeset = nl_langinfo(CODESET);
 	    cd = iconv_open(codeset, __encoding[data[0]]);
 	    if (cd == (iconv_t)-1) {
 		printf("[unsupported encoding %s]\n", __encoding[data[0]]);
-		return;
+		break;
 	    }
 
 	    printf("[%s] ", __encoding[data[0]]);

Powered by Mercurial.