Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: CVS commit: xsrc/external/mit/libpciaccess/dist



coypu%sdf.org@localhost writes:
> On Tue, Aug 29, 2017 at 05:52:34AM +0000, matthew green wrote:
> > @@ -175,6 +179,9 @@ insert( uint16_t vendor )
> >  		struct pci_id_node * child =
> >  		    calloc( 1, sizeof( struct pci_id_node ) );
> >  
> > +		if ( tree == NULL )
> > +		    return NULL;
> > +
> >  		child->bits = 4;
> >  
> >  		n->children[ idx ] = child;
> > @@ -183,6 +190,9 @@ insert( uint16_t vendor )
> >  		struct pci_id_leaf * leaf =
> >  		    calloc( 1, sizeof( struct pci_id_leaf ) );
> >  
> > +		if ( tree == NULL )
> > +		    return NULL;
> > +
> >  		leaf->vendor = vendor;
> 
> should check child & leaf instead, I think

seems not entirely unreasonable.  can you look at it, i was
just porting this change forward..  thanks!


.mrg.


Home | Main Index | Thread Index | Old Index