]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/string-util.c
tree-wide: use mfree more
[thirdparty/systemd.git] / src / basic / string-util.c
index dc7de5dab82538e4cfd969956d3eecb926845bb7..6b06e643c99398f6226d788589eeb04c70854abd 100644 (file)
@@ -610,8 +610,7 @@ char *strreplace(const char *text, const char *old_string, const char *new_strin
         return r;
 
 oom:
-        free(r);
-        return NULL;
+        return mfree(r);
 }
 
 char *strip_tab_ansi(char **ibuf, size_t *_isz) {
@@ -682,8 +681,7 @@ char *strip_tab_ansi(char **ibuf, size_t *_isz) {
 
         if (ferror(f)) {
                 fclose(f);
-                free(obuf);
-                return NULL;
+                return mfree(obuf);
         }
 
         fclose(f);