[Nagios-devel] create_job() may return NULL
Posted: Fri Nov 23, 2012 5:36 pm
Hya,
Function create_job() may return NULL in case of memory
allocation problems, so i think its valid to verify if
job is valid on wproc_run_job().
-rm
===================================================================
--- base/workers.c (revision 2479)
+++ base/workers.c (working copy)
@@ -869,6 +869,9 @@
worker_process *wp;
int ret;
+ if (!job)
+ return ERROR;
+
/*
* get_worker() also adds job to the workers list
* and sets job_id
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Function create_job() may return NULL in case of memory
allocation problems, so i think its valid to verify if
job is valid on wproc_run_job().
-rm
===================================================================
--- base/workers.c (revision 2479)
+++ base/workers.c (working copy)
@@ -869,6 +869,9 @@
worker_process *wp;
int ret;
+ if (!job)
+ return ERROR;
+
/*
* get_worker() also adds job to the workers list
* and sets job_id
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]