|
|
|
@ -333,7 +333,7 @@ static inline void free_plugin_mem(struct st_plugin_dl *p) |
|
|
|
dlclose(p->handle); |
|
|
|
#endif
|
|
|
|
my_free(p->dl.str, MYF(MY_ALLOW_ZERO_PTR)); |
|
|
|
if (p->version != MYSQL_PLUGIN_INTERFACE_VERSION) |
|
|
|
if (p->allocated) |
|
|
|
my_free((uchar*)p->plugins, MYF(MY_ALLOW_ZERO_PTR)); |
|
|
|
} |
|
|
|
|
|
|
|
@ -454,13 +454,15 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report) |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
if (sizeof_st_plugin != sizeof(st_mysql_plugin)) |
|
|
|
{ |
|
|
|
for (i= 0; |
|
|
|
((struct st_mysql_plugin *)(ptr+i*sizeof_st_plugin))->info; |
|
|
|
i++) |
|
|
|
/* no op */; |
|
|
|
|
|
|
|
cur= (struct st_mysql_plugin*) |
|
|
|
my_malloc(i*sizeof(struct st_mysql_plugin), MYF(MY_ZEROFILL|MY_WME)); |
|
|
|
my_malloc((i+1)*sizeof(struct st_mysql_plugin), MYF(MY_ZEROFILL|MY_WME)); |
|
|
|
if (!cur) |
|
|
|
{ |
|
|
|
free_plugin_mem(&plugin_dl); |
|
|
|
@ -481,6 +483,8 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report) |
|
|
|
memcpy(cur+i, old, min(sizeof(cur[i]), sizeof_st_plugin)); |
|
|
|
|
|
|
|
sym= cur; |
|
|
|
plugin_dl.allocated= true; |
|
|
|
} |
|
|
|
} |
|
|
|
plugin_dl.plugins= (struct st_mysql_plugin *)sym; |
|
|
|
|
|
|
|
|