]> diplodocus.org Git - nmh/commitdiff
Fixed leak in content_charset(): if get_param() found the charset,
authorDavid Levine <levinedl@acm.org>
Sun, 16 Nov 2014 23:10:52 +0000 (17:10 -0600)
committerDavid Levine <levinedl@acm.org>
Sun, 16 Nov 2014 23:10:52 +0000 (17:10 -0600)
it returns a copy.

uip/mhparse.c

index 56374b230731e9da9860eef2e0461bcfc739519b..0ec7712ed9cb1f6ef777382ff0b491227327f7a1 100644 (file)
@@ -3649,7 +3649,7 @@ content_charset (CT ct) {
 
     ret_charset = get_param(ct->c_ctinfo.ci_first_pm, "charset", '?', 0);
 
-    return getcpy (ret_charset ? ret_charset : "US-ASCII");
+    return ret_charset ? ret_charset : getcpy ("US-ASCII");
 }