Proper freeing of memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My little rpm app is giving me some frightful valgrind results. My code is pretty much:

rpmReadConfigFiles(NULL, NULL);
rpmdbOpen(NULL, &db, O_RDONLY, 0644);
rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0);
while((h = rpmdbNextIterator(mi)) != NULL) {
	/* grab name, version, and release */
}

rpmdbFreeIterator(mi);
rpmdbClose(db);

Valgrind gives me the following:

definitely lost: 9 bytes  in 1 blocks.
still reachable: 32629 bytes in 1589.

Give that example code, is there some mystery *Free* function I'm missing? I'm using 4.0.4 from RedHat 7.2. Perhaps that has something to do with it?

Cory 'G' Watson
http://www.loggerithim.org

"The universal aptitude for ineptitude makes any human accomplishment an incredible miracle." - Dr. John Paul Stapp


_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux