Browse code

Fix error return

git-svn: trunk@924

Nigel Horne authored on 2004/09/23 01:24:22
Showing 1 changed files
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: message.c,v $
20
+ * Revision 1.90  2004/09/22 16:24:22  nigelhorne
21
+ * Fix error return
22
+ *
20 23
  * Revision 1.89  2004/09/22 16:19:13  nigelhorne
21 24
  * Fix error return
22 25
  *
... ...
@@ -264,7 +267,7 @@
264 264
  * uuencodebegin() no longer static
265 265
  *
266 266
  */
267
-static	char	const	rcsid[] = "$Id: message.c,v 1.89 2004/09/22 16:19:13 nigelhorne Exp $";
267
+static	char	const	rcsid[] = "$Id: message.c,v 1.90 2004/09/22 16:24:22 nigelhorne Exp $";
268 268
 
269 269
 #if HAVE_CONFIG_H
270 270
 #include "clamav-config.h"
... ...
@@ -896,19 +899,18 @@ messageSetEncoding(message *m, const char *enctype)
896 896
 				m->encodingTypes[m->numberOfEncTypes++] = e->type;
897 897
 
898 898
 				cli_dbgmsg("Encoding type %d is \"%s\"\n", m->numberOfEncTypes, type);
899
-				free(type);
900 899
 				break;
901 900
 			}
902 901
 
903 902
 		if(e->string == NULL) {
904 903
 			cli_warnmsg("Unknown encoding type \"%s\"\n", type);
904
+			free(type);
905 905
 			/*
906 906
 			 * Err on the side of safety, enable all decoding
907 907
 			 * modules
908 908
 			 */
909 909
 			messageSetEncoding(m, "base64");
910 910
 			messageSetEncoding(m, "quoted-printable");
911
-			free(type);
912 911
 			break;
913 912
 		}
914 913