From 72d7ace64d2b511fe810e3d2564b3372afbe365f Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 13 Jun 2024 16:40:28 +0530 Subject: jobs/job_read_inputdrvs: avoid inserting NULL pointer to dlist --- src/jobs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/jobs.c b/src/jobs.c index aef9fe5..b5fd31c 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -76,12 +76,11 @@ static int job_read_inputdrvs(struct job *job, cJSON *input_drvs) goto out_free; } } + LIST_INSERT_HEAD(&job->deps, dep_job, dlist); drv_path = NULL; out_name = NULL; dep_job = NULL; - - LIST_INSERT_HEAD(&job->deps, dep_job, dlist); } out_free: -- cgit v1.2.3