1
0
mirror of https://github.com/systemd/systemd synced 2026-04-11 17:44:58 +02:00

Compare commits

..

No commits in common. "a420d71793bcbc1539a63be60f83cdc14373ea4a" and "a5016a0acea0d3b8b7791042da5132146465a943" have entirely different histories.

3 changed files with 10 additions and 14 deletions

2
NEWS
View File

@ -1,6 +1,6 @@
systemd System and Service Manager systemd System and Service Manager
CHANGES WITH 250: CHANGES WITH 250 in spe:
* Support for encrypted and authenticated credentials has been added. * Support for encrypted and authenticated credentials has been added.
This extends the credential logic introduced with v247 to support This extends the credential logic introduced with v247 to support

View File

@ -26,9 +26,6 @@ static void log_syntax_callback(const char *unit, int level, void *userdata) {
if (level > LOG_WARNING) if (level > LOG_WARNING)
return; return;
if (*s == POINTER_MAX)
return;
r = set_put_strdup(s, unit); r = set_put_strdup(s, unit);
if (r < 0) { if (r < 0) {
set_free_free(*s); set_free_free(*s);

View File

@ -212,7 +212,7 @@ static Match *match_new(Match *p, MatchType t) {
return m; return m;
} }
static Match *match_free(Match *m) { static void match_free(Match *m) {
assert(m); assert(m);
while (m->matches) while (m->matches)
@ -222,18 +222,18 @@ static Match *match_free(Match *m) {
LIST_REMOVE(matches, m->parent->matches, m); LIST_REMOVE(matches, m->parent->matches, m);
free(m->data); free(m->data);
return mfree(m); free(m);
} }
static Match *match_free_if_empty(Match *m) { static void match_free_if_empty(Match *m) {
if (!m || m->matches) if (!m || m->matches)
return m; return;
return match_free(m); match_free(m);
} }
_public_ int sd_journal_add_match(sd_journal *j, const void *data, size_t size) { _public_ int sd_journal_add_match(sd_journal *j, const void *data, size_t size) {
Match *l3, *l4, *add_here = NULL, *m = NULL; Match *l3, *l4, *add_here = NULL, *m;
uint64_t hash; uint64_t hash;
assert_return(j, -EINVAL); assert_return(j, -EINVAL);
@ -322,11 +322,10 @@ _public_ int sd_journal_add_match(sd_journal *j, const void *data, size_t size)
return 0; return 0;
fail: fail:
match_free(m);
match_free_if_empty(add_here); match_free_if_empty(add_here);
j->level2 = match_free_if_empty(j->level2); match_free_if_empty(j->level2);
j->level1 = match_free_if_empty(j->level1); match_free_if_empty(j->level1);
j->level0 = match_free_if_empty(j->level0); match_free_if_empty(j->level0);
return -ENOMEM; return -ENOMEM;
} }