drivers/xgi: Avoid double-free

xgifb_probe() doesn't own the object it tries to free
in its error code path, potentially leading to a
double-free in xgi_z9s_init().

Since we don't actually implement free, it doesn't matter
too much, but let's keep things proper.

Change-Id: I70c8f395fd59584664040ca6e07be56e046c80fc
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Found-by: Coverity Scan
Reviewed-on: http://review.coreboot.org/8506
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Patrick Georgi 2015-02-22 16:13:57 +01:00 committed by Patrick Georgi
parent 1f565b4023
commit b4ad5d0a93
1 changed files with 0 additions and 1 deletions

View File

@ -333,7 +333,6 @@ int xgifb_probe(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info)
error_1: error_1:
error_disable: error_disable:
free(xgifb_info);
return ret; return ret;
} }