aboutsummaryrefslogtreecommitdiff
path: root/src/jobid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jobid.c')
-rw-r--r--src/jobid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jobid.c b/src/jobid.c
index d1ca8ab..07f3ea5 100644
--- a/src/jobid.c
+++ b/src/jobid.c
@@ -3,8 +3,8 @@
#include <stdlib.h>
#include <string.h>
-#include "jobs.h"
#include "jobid.h"
+#include "jobs.h"
#include "util.h"
static int dag_id_assign(struct job *j, struct jobid *jobid);
@@ -42,6 +42,9 @@ static int dag_id_assign(struct job *j, struct jobid *jobid)
void jobid_free(struct jobid *jid)
{
+ if (jid == NULL)
+ return;
+
free(jid->jobs);
free(jid);
}