Fix CID 1491068 and 1491217: resource leaks.
[claws.git] / src / filtering.c
index 9e1d98158dafb70c1cf38ad4ead978a5ca8beb60..d5ee27da07c7afc4926b1c12f323566dde722308 100644 (file)
@@ -540,6 +540,8 @@ static gboolean filteringaction_apply(FilteringAction * action, MsgInfo * info)
                        } else {
                                g_warning("header '%s' not set or empty", action->header?action->header:"(null)");
                        }
+                       if (header)
+                               procheader_header_free(header);
                        return (errors == 0);
                }
        default:
@@ -1008,6 +1010,7 @@ gchar *filteringaction_to_string(FilteringAction *action)
                break;
 
        default:
+               g_string_free(dest, TRUE);
                return NULL;
        }
        deststr = dest->str;