android_kernel_xiaomi_sm8350/drivers
Jesper Juhl b91aac29bb PCI Hotplug: Fix small mem leak in IBM Hot Plug Controller Driver
In drivers/pci/hotplug/ibmphp_ebda.c::ebda_rsrc_controller(), storage is
allocated with kzalloc() and assigned to 'tmp_slot'.  Then lots of
stuff, like ->flag, ->supported_speed etc is set in tmp_slot.  A bit
further down there's then this test :

  if (!bus_info_ptr1) {
    rc = -ENODEV;
    goto error;
  }

At this point, tmp_slot has not been assigned to anything, so when
erroring-out we want to free it, but nothing at the 'error:' label
free's 'tmp_slot' - and we can't really free 'tmp_slot' at 'error:'
since we may jump to that label later when 'tmp_slot' *has* been used
and we do not want it freed. So, the only sane option left seems to be
to kfree(tmp_slot) just before jumping to the 'error:' label in the one
place where this is what actually makes sense. The following patch does
just that and thus kills off a tiny potential memory leak.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-10 16:38:02 -07:00
..
acorn/char Fix default compose table initialization 2008-03-03 14:53:16 -08:00
acpi
amba
ata ahci: work around ATI SB600 h/w quirk 2008-03-05 07:53:06 -05:00
atm
auxdisplay
base Driver core: Fix cleanup when failing device_add(). 2008-03-04 14:47:05 -08:00
block pktcdvd: reduce stack consumption 2008-03-04 16:35:12 -08:00
bluetooth bluetooth: Add another Broadcom device 2008-03-07 15:20:03 -08:00
cdrom make cdrom.c:check_for_audio_disc() static 2008-03-04 11:28:41 +01:00
char drivers/char/esp.c: fix bootup lockup 2008-03-07 10:05:13 -08:00
clocksource
connector CONNECTOR: make cn_already_initialized static 2008-02-26 18:42:44 -08:00
cpufreq [CPUFREQ] fix section mismatch warnings 2008-03-05 14:45:31 -05:00
cpuidle
crypto
dca
dio
dma ioat: fix 'ack' handling, driver must ensure that 'ack' is zero 2008-03-04 10:16:46 -07:00
edac
eisa
firewire firewire: fix crash in automatic module unloading 2008-03-02 12:35:46 +01:00
firmware dmi: prevent linked list corruption 2008-02-23 17:12:15 -08:00
gpio
hid
hwmon
i2c i2c-i801: Add support for the ICH10 2008-02-24 20:03:42 +01:00
ide ide: update references to Documentation/ide/ide.txt (v2) 2008-03-07 21:53:50 +01:00
ieee1394
infiniband RDMA/nes: Fix interrupt moderation low threshold 2008-02-26 16:24:29 -08:00
input input: add I2C to config since the driver makes several i2c*() calls 2008-03-04 16:35:18 -08:00
isdn gigaset: fix Oops on module unload regression 2008-03-07 11:06:08 -08:00
leds
lguest
macintosh
mca
md md: the md RAID10 resync thread could cause a md RAID10 array deadlock 2008-03-04 16:35:18 -08:00
media
memstick
message [SCSI] mpt fusion: don't oops if NumPhys==0 2008-03-05 14:57:57 -06:00
mfd sm501: add support for the SM502 programmable PLL 2008-03-04 16:35:13 -08:00
misc ACPI: thinkpad-acpi: fix hotkey_get_tablet_mode 2008-03-04 16:35:16 -08:00
mmc
mtd UBI: mtd/ubi/vtbl.c: fix memory leak 2008-03-04 11:03:09 +02:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-03-04 20:20:58 -08:00
nubus
of
oprofile
parisc parisc: fix IOMMU's device boundary overflow bug on 32bits arch 2008-03-05 17:55:13 -08:00
parport
pci PCI Hotplug: Fix small mem leak in IBM Hot Plug Controller Driver 2008-03-10 16:38:02 -07:00
pcmcia
pnp
power
ps3
rapidio docbook: fix rapidio source files 2008-03-03 10:47:13 -08:00
rtc rtc: add support for the S-35390A RTC chip 2008-03-04 16:35:09 -08:00
s390 [S390] zcrypt: fix ap_device_list handling 2008-03-05 12:37:19 +01:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2008-03-05 17:49:59 -08:00
serial drivers/serial/m32r_sio.c: correct use of ! and & 2008-03-04 16:35:16 -08:00
sh maple: fix device detection 2008-02-26 14:12:09 +09:00
sn
spi powerpc: mpc5200: fix build error on mpc52xx_psc_spi device driver 2008-03-04 16:35:12 -08:00
ssb ssb: Add pcibios_enable_device() return value check 2008-03-04 18:36:35 -05:00
tc
telephony
thermal
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2008-03-04 16:37:35 -08:00
video fb: hitfb: Balance probe/remove section annotations. 2008-03-06 13:56:33 +09:00
virtio
w1 ds1wm: report bus reset error 2008-03-04 16:35:12 -08:00
watchdog
xen
zorro
Kconfig
Makefile