Fix some small leaks on error paths
[collectd.git] / src / utils_cache.c
index 7eae1c7..910e30b 100644 (file)
@@ -191,6 +191,7 @@ static int uc_insert (const data_set_t *ds, const value_list_t *vl,
        /* This shouldn't happen. */
        ERROR ("uc_insert: Don't know how to handle data source type %i.",
            ds->ds[i].type);
+       sfree (key_copy);
        return (-1);
     } /* switch (ds->ds[i].type) */
   } /* for (i) */