Skip to content

Commit

Permalink
fixed print label
Browse files Browse the repository at this point in the history
  • Loading branch information
justanhduc committed Nov 10, 2020
1 parent 65581c7 commit 1c54280
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,11 @@ void s_get_label(int s, int jobid)
return;
}

label = (char *) malloc(strlen(p->label) + 1);
sprintf(label, "%s\n", p->label);
if (p->label) {
label = (char *) malloc(strlen(p->label) + 1);
sprintf(label, "%s\n", p->label);
} else
label = "";
send_list_line(s, label);
}

Expand Down

0 comments on commit 1c54280

Please sign in to comment.