#50341 Ticket 50340 - structs for diabled plugins will not be freed
Closed 3 years ago by spichugi. Opened 4 years ago by lkrispen.
lkrispen/389-ds-base t50340  into  master

@@ -779,6 +779,7 @@ 

          if (PR_SUCCESS != PR_CallOnce(&ol_init_callOnce, internal_ol_init_init)) {

              slapi_log_err(SLAPI_LOG_ERR, "slapi_ldap_init_ext",

                            "Could not perform internal ol_init init\n");

+             slapi_ch_free_string(&makeurl);

              rc = -1;

              goto done;

          }

file modified
+1 -1
@@ -3040,7 +3040,7 @@ 

      }

  

  PLUGIN_CLEANUP:

-     if (status) {

+     if (status || !enabled) {

          plugin_free(plugin);

This causes a crash when doing an offline db2ldif -r, the plugin is freed and a null pointer is dereferenced

      }

      slapi_ch_free((void **)&configdir);

Bug: when plugins are loaded from dse.ldif enabled plugins will be added to
the list of the plugin type and freed when plugins are stopped.
But the memory allocated for disabled plugins will remain allocated and
and be reported.

Fix: free plugin if not enabled after loading
This will alos let the many leaks reported for "GrowStuff" disappear.
The fix also contains one missing free for slapi_ch_smprintf allocated memory

Reviewed by: ?

Ack, can you cherry-pick this to 1.4.0 as well?

rebased onto fc46de6

4 years ago

Pull-Request has been merged by lkrispen

4 years ago

Ack, can you cherry-pick this to 1.4.0 as well?

done

This causes a crash when doing an offline db2ldif -r, the plugin is freed and a null pointer is dereferenced

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 pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3400

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago