Don't free() allocated statics

This commit is contained in:
наб 2023-11-25 18:11:01 +01:00
parent 286180b138
commit 6b3cc6971d
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1
2 changed files with 6 additions and 9 deletions

View File

@ -157,22 +157,22 @@ msgstr "klucza zawijania %2$s dla %1$s"
msgid "Couldn't unseal wrapping key with PCR policy: %s\n"
msgstr "Nie udało się rozpieczętować klucza zawijania z polityką PCR: %s\n"
#: src/zfs.cpp:101
#: src/zfs.cpp:98
#, c-format
msgid "You might need to run \"zfs inherit %s %s\" and \"zfs inherit %s %s\" to fully clear metadata!\n"
msgstr "Możliwe, że potrzebujesz uruchomić \"zfs inherit %s %s\" i \"zfs inherit %s %s\" żeby całkowicie pozbyć się metadanych!\n"
#: src/zfs.cpp:116
#: src/zfs.cpp:113
#, c-format
msgid "Dataset %s not encrypted with tzpfms!\n"
msgstr "Dataset %s nie jest szyfrowany tzpfms!\n"
#: src/zfs.cpp:118
#: src/zfs.cpp:115
#, c-format
msgid "Dataset %s encrypted with tzpfms back-end %s, but we are %s.\n"
msgstr "Dataset %s szyfrowany tzpfms %s, ale ten program rozumie %s.\n"
#: src/zfs.cpp:122
#: src/zfs.cpp:119
#, c-format
msgid "Dataset %s missing key data.\n"
msgstr "Dataset %s nie ma klucza.\n"

View File

@ -10,10 +10,8 @@
#include <string.h>
// Funxion statics pull in libc++'s __cxa_guard_acquire()
static nvlist_t * rrargs{};
static quickscope_wrapper rrargs_deleter{[] { nvlist_free(rrargs); }};
nvlist_t * rewrap_args() {
static nvlist_t * rrargs;
if(!rrargs)
if(auto err =
[&] {
@ -33,9 +31,8 @@ nvlist_t * rewrap_args() {
}
static nvlist_t * crrargs{};
static quickscope_wrapper crrargs_deleter{[] { nvlist_free(crrargs); }};
nvlist_t * clear_rewrap_args() {
static nvlist_t * crrargs;
if(!crrargs)
if(auto err =
[&] {