(1) Clang warning. ldap/servers/slapd/util.c:1631:20: warning: Dereference of null pointer (loaded from variable 'procpages')
28. 389-ds-base-1.3.5.9/ldap/servers/slapd/util.c:1631:20: note: Dereference of null pointer (loaded from variable 'procpages') # *procpages /= (*pagesize / 1024); # ~~~~~~~~~ ^ # 1629| freesize /= (*pagesize / 1024); # 1630| /* procpages is now in kb not pages... */ # 1631|-> *procpages /= (*pagesize / 1024); # 1632| # 1633| rlimsize = util_getvirtualmemsize();
==> assign only if procpages is not NULL.
(2) Resource Leaks ldap/servers/plugins/replication/repl5_tot_protocol.c:616: leaked_storage: Variable "pb" going out of scope leaks the storage it points to. ==> needs to move "slapi_pblock_destroy (pb)" after the "done" label.
diff --git a/ldap/servers/plugins/replication/repl5_tot_protocol.c b/ldap/servers/plugins/replication/repl5_tot_protocol.c index aac89bd..ce2d943 100644 --- a/ldap/servers/plugins/replication/repl5_tot_protocol.c +++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c @@ -575,7 +575,6 @@ retry: * suitable messages will have been logged to the error log about the failure. */ - slapi_pblock_destroy (pb); agmt_set_last_init_end(prp->agmt, current_time()); rc = cb_data.rc; agmt_set_update_in_progress(prp->agmt, PR_FALSE); @@ -595,6 +594,7 @@ retry: } done: + slapi_pblock_destroy (pb); slapi_sdn_free(&area_sdn);
git patch file (master) 0001-Ticket-48905-coverity-defects.patch
Looks good to me.
Thanks sooo much for your quick review, William!
Pushed to master: a33899f..622d6a6 master -> master commit 0ef4adbc6bc671d5f9fa0c91a3cd785cb979450a
Metadata Update from @firstyear: - Issue assigned to nhosoi - Issue set to the milestone: 1.3.5.10
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/1964
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)