Skip to content

Commit

Permalink
libs,daemons: fix a couple of crashes in the daemons
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht committed Feb 14, 2025
1 parent 92a5b46 commit f201374
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions daemons/cookd/server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ int cookd_server_init(gracht_client_t* client, int builderCount)
void cookd_server_cleanup(void)
{
VLOG_DEBUG("cookd", "cookd_server_cleanup()\n");
if (g_server == NULL) {
return;
}

__cookd_server_stop(g_server);
__cookd_server_delete(g_server);
Expand Down
2 changes: 1 addition & 1 deletion libs/vlog/logf.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void vlog_output(enum vlog_level level, const char* tag, const char* format, ...
int colsWritten = 0;

// ensure level is appropriate for output
if (output->handle != NULL && level > output->level) {
if (output->handle == NULL || level > output->level) {
continue;
}

Expand Down
2 changes: 2 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ grade: stable
confinement: strict
assumes: [snap-uid-envvars]

architectures: [amd64,arm64,riscv64,ppc64el,s390x]

apps:
bake:
command: usr/bin/bake
Expand Down

0 comments on commit f201374

Please sign in to comment.