diff options
| author | dacctal <donotcontactmevia@email.invalid> | 2026-07-18 04:26:33 +0000 |
|---|---|---|
| committer | dacctal <donotcontactmevia@email.invalid> | 2026-07-18 04:26:33 +0000 |
| commit | 67acacff67a21750c05de725ba938d682f3d5337 (patch) | |
| tree | 79d79f1eab588549f736c6ed9fa64dbc19ae2630 | |
| parent | 7e145a01a440c15aa3f0c1859cd543f4f7a36d4c (diff) | |
fix free bug in pkg_create.crewrite
| -rw-r--r-- | src/pkg_create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg_create.c b/src/pkg_create.c index cf5170f..de85ae8 100644 --- a/src/pkg_create.c +++ b/src/pkg_create.c @@ -27,11 +27,11 @@ #include "str.h" static str get_destdir(str *cwd, str *arg) { - str result; + str result = {0}; if (str_first(arg) == '.' && arg->len == 1) { result = str_format("%.*s/%.*s", str_fmt(&inst_dirs.src), str_fmt(cwd)); } else { - str name; + str name = {0}; if (str_find_char(arg, '/') != 0) name = str_from_after_delim(arg, '/'); else str_copy_into(&name, arg); result = str_format("%.*s/%.*s", str_fmt(&inst_dirs.src), str_fmt(&name)); |
