Package: dpkg
Version: 1.16.1.2
Tags: bug

in dbdir.c:
> /** * Get a pathname to the current on-disk database directory. * *
> This function returns an allocated string, which should be freed with
> * free(2). * * @param pathpart The pathpart to append to the new
> pathnme. * * @return The newly allocated pathname. */ char *
> dpkg_db_get_path(const char *pathpart) { char *pathname;
> m_asprintf(&pathname, "%s/%s", db_dir, pathpart); return pathname; } 

That function is called in filesdb.c:

> static void pkgadmindir_init(void) { infodir =
> dpkg_db_get_path(INFODIR); } 

...which is called in filesdb.c(again):
> void filesdbinit(void) { struct filenamenode *fnn; int i;
> pkgadmindir_init(); for (i=0; i<BINS; i++) for (fnn= bins[i]; fnn;
> fnn= fnn->next) { fnn->flags= 0; fnn->oldhash = NULL; fnn->filestat =
> NULL; } } 



Anyways, point is, pathname is never freed.




Thanks,

-- 
-- Joshua Rogers <https://internot.info/>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to