g_nop_create: destroy newly created provider in case of errors.

This commit is contained in:
fjoe 2004-09-16 15:28:48 +00:00
parent a9c80017cb
commit d1fc3f715d

View File

@ -213,7 +213,7 @@ g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp,
g_destroy_consumer(cp);
}
if (newpp != NULL)
g_destroy_provider(pp);
g_destroy_provider(newpp);
if (gp != NULL) {
if (gp->softc != NULL)
g_free(gp->softc);