提交 7d09713d 编写于 作者: G Geoff Thorpe

DSO_load() should also work when it is passed a NULL - a new DSO is created

automatically, however some code was still referring to the original
pointer rather than the internal one (and thus to NULL instead of the
created pointer).
上级 3aba98e7
......@@ -209,7 +209,7 @@ DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags)
else
ret = dso;
/* Don't load if we're currently already loaded */
if(dso->filename != NULL)
if(ret->filename != NULL)
{
DSOerr(DSO_F_DSO_LOAD,DSO_R_DSO_ALREADY_LOADED);
goto err;
......@@ -217,12 +217,12 @@ DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags)
/* filename can only be NULL if we were passed a dso that already has
* one set. */
if(filename != NULL)
if(!DSO_set_filename(dso, filename))
if(!DSO_set_filename(ret, filename))
{
DSOerr(DSO_F_DSO_LOAD,DSO_R_SET_FILENAME_FAILED);
goto err;
}
filename = dso->filename;
filename = ret->filename;
if(filename == NULL)
{
DSOerr(DSO_F_DSO_LOAD,DSO_R_NO_FILENAME);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册