OSDN Git Service

Delay allocation of agp_info so we don't leak it on prior errors
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Fri, 4 Jun 2010 23:58:56 +0000 (16:58 -0700)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Sat, 5 Jun 2010 00:00:57 +0000 (17:00 -0700)
commitfa7cca617583eb93a862c5ebbb5a56843210e5a8
treecc490347e13c656ad0622ea609e834eb0236fe28
parentb8295f4776912d4c3cef836eb0f158e07b432a25
Delay allocation of agp_info so we don't leak it on prior errors

   Memory leak of pointer 'agp_info'
        at line 119 of src/common_capability.c in function 'pci_fill_capabilities_generic'.
          'agp_info' allocated at line 107 with calloc(1, 12).
          'agp_info' leaks when err != 0 at line 118.
        at line 124 of src/common_capability.c in function 'pci_fill_capabilities_generic'.
          'agp_info' allocated at line 107 with calloc(1, 12).
          'agp_info' leaks when err != 0 at line 123.

[ This bug was found by the Parfait bug checking tool.
  For more information see http://research.sun.com/projects/parfait ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
src/common_capability.c