On 01/31/11 04:02 AM, Erkki Seppälä wrote: > Variable "table" goes out of scope > > Reviewed-by: Ander Conselvan de Oliveira > <[email protected]> > Signed-off-by: Erkki Seppälä <[email protected]> > --- > src/Xrm.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/src/Xrm.c b/src/Xrm.c > index 21f0af3..3e68c37 100644 > --- a/src/Xrm.c > +++ b/src/Xrm.c > @@ -842,8 +842,10 @@ static void PutEntry( > nprev = NodeBuckets(table); \ > } else { \ > table->leaf = 1; \ > - if (!(nprev = (NTable *)Xmalloc(sizeof(VEntry *)))) \ > + if (!(nprev = (NTable *)Xmalloc(sizeof(VEntry *)))) {\ > + Xfree(table); \ > return; \ > + } \ > ((LTable)table)->buckets = (VEntry *)nprev; \ > } \ > *nprev = (NTable)NULL; \
Reviewed-by: Alan Coopersmith <[email protected]> -- -Alan Coopersmith- [email protected] Oracle Solaris Platform Engineering: X Window System _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
