Skip to content

Commit

Permalink
metaX: Don't use the service ID if it is NULL to avoid segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
AymericDu committed Nov 18, 2020
1 parent e296a36 commit e03805d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlx/sqlx_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ _task_probe_repository(gpointer p)
(void) g_rmdir(path);
if (rc != 0) {
gchar *msg = g_strdup_printf("IO error on %s %s: (%d) %s",
ss->service_id->str, path, errsav, strerror(errsav));
_get_url(ss), path, errsav, strerror(errsav));
GRID_WARN("%s", msg);
grid_daemon_notify_io_status(ss->dispatcher, FALSE, msg);
g_free(msg);
Expand All @@ -1101,7 +1101,7 @@ _task_probe_repository(gpointer p)
(void) g_unlink(path);
if (!rc) {
gchar *msg = g_strdup_printf("IO error on %s %s: (%d) %s",
ss->service_id->str, path, err->code, err->message);
_get_url(ss), path, err->code, err->message);
GRID_WARN("%s", msg);
g_clear_error(&err);
grid_daemon_notify_io_status(ss->dispatcher, FALSE, msg);
Expand Down

0 comments on commit e03805d

Please sign in to comment.