avoid NULL pointer dereference.
PATCH 1/1 avoid NULL pointer dereference.
Hi All,
xen/common/acm_ops.c, check for a NULL pointer and then
cheerfully dereferences it.
Signed-off-by Tony Breeds <[email protected]>
xen/common/acm_ops.c +1 -1
@@ -172,7 +172,7 @@ }if (subj->ssid ==NULL ) {put_domain (subj); - ret = -ESRCH ; +return -ESRCH ; } ssidref1 = ((struct acm_ssid_domain *)(subj->ssid))->ssidref;put_domain (subj);
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2006.linux.org.au/
Jan 23-28 2006 The Australian Linux Technical Conference!
Keir Fraser
AppliedQuoted 5 lines · Tony Breeds
Hi All,
xen/common/acm_ops.c, check for a NULL pointer and then
cheerfully dereferences it.Signed-off-by Tony Breeds <[email protected]>
Applied, but nearby code goto's out so I changed the patch to do that.
In fact there seems to be no convention in that function as to whether returning immediately or goto'ing out (and doing dome return-code cooking) is the right thing to do. Should all the returns be goto out's?
If there is an important distinction then a comment describing it ought to be added.
-- Keir