fixed a bug in stix_importmod()

This commit is contained in:
hyunghwan.chung 2016-12-31 15:52:46 +00:00
parent 95d8c0dc5a
commit 54dd7675b0

View File

@ -525,7 +525,7 @@ int stix_importmod (stix_t* stix, stix_oop_t _class, const stix_ooch_t* name, st
if (!mdp) if (!mdp)
{ {
r = -1; r = -1;
goto done; goto done2;
} }
} }
@ -547,10 +547,11 @@ int stix_importmod (stix_t* stix, stix_oop_t _class, const stix_ooch_t* name, st
done: done:
if (!pair) if (!pair)
{ {
/* clsoe the module if it has been opened in this function. */ /* close the module if it has been opened in this function. */
stix_closemod (stix, mdp); stix_closemod (stix, mdp);
} }
done2:
stix_poptmp (stix); stix_poptmp (stix);
return r; return r;
} }