fosphor: Fix double free in the init failure case

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2013-11-13 23:56:23 +01:00
parent 32a28fc495
commit f5cee5f826
2 changed files with 6 additions and 0 deletions

View File

@ -606,6 +606,9 @@ fosphor_cl_release(struct fosphor *self)
/* Release structure */
free(cl);
/* Nothing left */
self->cl = NULL;
}
int

View File

@ -253,6 +253,9 @@ fosphor_gl_release(struct fosphor *self)
/* Release structure */
free(gl);
/* Nothing left */
self->gl = NULL;
}