Bug 189 - Dangling pointer in job_func.c
: Dangling pointer in job_func.c
Status: NEW
Product: TORQUE
pbs_server
: 3.0.x
: PC Linux
: P5 major
Assigned To: David Beer
:
:
:
  Show dependency treegraph
 
Reported: 2012-04-30 06:49 MDT by rhys.hill
Modified: 2012-04-30 06:49 MDT (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description rhys.hill 2012-04-30 06:49:41 MDT
In job_func.c, there are two places where job_purge is called, like so:

job_purge(pjob); 
*pjobp = NULL;

where pjob = *pjobp. However, this pattern leaves pjob pointer at a dead
structure, and mean that later NULL tests on job are incorrect. Simply doing
this:

job_purge(pjob);
*pjobp = NULL;
 pjob = NULL;

resolves the problem.