History log of /libpciaccess/src/common_io.c (Results 1 – 5 of 5)
Revision Date Author Comments
# a798395a 25-Nov-2011 Daniel Drake <[email protected]>

delete_io_handle: fix deletion of last handle

When num_ios goes from 1 to 0, a realloc(ios, 0); call is made.
This is equivalent to free(ios) and NULL is returned.

However, the previous logic in th

delete_io_handle: fix deletion of last handle

When num_ios goes from 1 to 0, a realloc(ios, 0); call is made.
This is equivalent to free(ios) and NULL is returned.

However, the previous logic in the code incorrectly discards this NULL
return value. When we next call new_io_handle(), realloc(ios, X) is
called with "ios" pointing to freed memory. This causes glibc to abort.

Correct this logic to detect the 1-to-0 case and handle it correctly.
Other cases are unchanged; there is still value in checking the
return value from realloc() as it also returns NULL on error.

Signed-off-by: Daniel Drake <[email protected]>
Reviewed-by: Alan Coopersmith <[email protected]>

show more ...


# e1a0240a 17-Sep-2011 Alan Coopersmith <[email protected]>

Strip trailing whitespace

Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersm

Strip trailing whitespace

Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change

Signed-off-by: Alan Coopersmith <[email protected]>

show more ...


# 947ab16f 14-Dec-2009 Adam Jackson <[email protected]>

Fix I/O handle array allocator to work for devices past the first

Signed-off-by: Adam Jackson <[email protected]>


# d4e008ee 14-Dec-2009 Adam Jackson <[email protected]>

Fix pci_device_open_io() to actually return something useful

Remember, code review just means we're all inept.

Signed-off-by: Adam Jackson <[email protected]>


# 5e8d4c19 18-Nov-2009 Adam Jackson <[email protected]>

I/O port access routines

Acked-by: Tiago Vignatti <[email protected]>
Acked-by: Matt Turner <[email protected]>
Signed-off-by: Adam Jackson <[email protected]>