Re: Possible bug (memory leak) in serving return code from tdb_fetch( ).

2002-11-22 Thread jra
On Fri, Nov 22, 2002 at 04:28:22PM -0800, Arcady Chernyak wrote: > Hi. > I have analyzed code of the function: > > static struct printjob *print_job_find(int jobid) > { > static struct printjob pjob; > TDB_DATA ret; > > ret = tdb_fetch(tdb, print_key(jobid)); > if (!ret.dptr || r

Possible bug (memory leak) in serving return code from tdb_fetch().

2002-11-22 Thread Arcady Chernyak
Hi. I have analyzed code of the function: static struct printjob *print_job_find(int jobid) { static struct printjob pjob; TDB_DATA ret; ret = tdb_fetch(tdb, print_key(jobid)); if (!ret.dptr || ret.dsize != sizeof(pjob)) return NULL; memcpy(&pjob, ret.dptr, sizeof(pjob));