| 507 | |
| 508 | |
| 509 | static void free_plugin_mem(struct st_plugin_dl *p) |
| 510 | { |
| 511 | #ifdef HAVE_DLOPEN |
| 512 | if (p->ptr_backup) |
| 513 | { |
| 514 | DBUG_ASSERT(p->nbackups); |
| 515 | DBUG_ASSERT(p->handle); |
| 516 | restore_ptr_backup(p->nbackups, p->ptr_backup); |
| 517 | my_free(p->ptr_backup); |
| 518 | } |
| 519 | if (p->handle) |
| 520 | dlclose(p->handle); |
| 521 | #endif |
| 522 | my_free(const_cast<char*>(p->dl.str)); |
| 523 | if (p->allocated) |
| 524 | my_free(p->plugins); |
| 525 | } |
| 526 | |
| 527 | |
| 528 | /** |
no test coverage detected