From: Joe M. <jo...@Si...> - 2002-05-15 19:57:49
|
Hello Marko, That does indeed look correct. Thanks for the bug report. I will make those changes by tomorrow. Thanks, -Joe M. -- Joe McAlerney Silicon Defense: IDS Solutions Marko Jahnke wrote: > > Joey, > > since I changed to the 0.7.1 release of the above library > (primarily to get rid of the libntp), my purify tool indicated some > potential memory leaks. > > Is it possible that a few xmlFree() calls are missing after using > timeValToDatetime() and timevalToNtpTimestamp() as shown in the > following diff? > > --- idmefxml.c.orig Wed May 15 14:28:30 2002 > +++ idmefxml.c Wed May 15 14:29:48 2002 > @@ -1360,7 +1360,10 @@ > /* Set the ntpstamp attribute, and DATETIME value */ > > xmlSetProp(cur, "ntpstamp", ntpstamp); > + xmlFree(ntpstamp); > + > xmlNodeSetContent(cur, datetime); > + xmlFree(datetime); > > return(cur); > } > @@ -1410,8 +1413,11 @@ > > /* Set the ntpstamp attribute, and DATETIME value */ > > - xmlSetProp(cur, "ntpstamp", ntpstamp); > - xmlNodeSetContent(cur, datetime); > + xmlSetProp(cur, "ntpstamp", ntpstamp); > + xmlFree(ntpstamp); > + > + xmlNodeSetContent(cur, datetime); > + xmlFree(datetime); > > return(cur); > } > > Regards, > Marko > > -- > Marko Jahnke <ja...@fg...> > FGAN - Research Establishment for Applied Science > FKIE.KOM - Computer Networks > Wachtberg, Germany > Fon +49 228 9435 449 Fax +49 228 9435 685 |