Re: [libvirt] [PATCH 2/5] nss: Drop needless free() in gethostbyname3()

2019-09-30 Thread Erik Skultety
On Sat, Sep 28, 2019 at 10:05:30PM +0200, Michal Privoznik wrote: > The findLease() function allocates @addr array iff no error > occurred and at least one satisfactory record was found. > Therefore, there is no need to call free() if findLease() failed, > or did not find any records as addr ==

[libvirt] [PATCH 2/5] nss: Drop needless free() in gethostbyname3()

2019-09-28 Thread Michal Privoznik
The findLease() function allocates @addr array iff no error occurred and at least one satisfactory record was found. Therefore, there is no need to call free() if findLease() failed, or did not find any records as addr == NULL. Signed-off-by: Michal Privoznik --- tools/nss/libvirt_nss.c | 3 ---