Skip to content

Commit

Permalink
do not ignore the result of solv_realloc when shrinking whatprovidesa…
Browse files Browse the repository at this point in the history
…uxdata

As we're always shrinking the code worked with glibc, but resulted
in a segfault under valgrind.
  • Loading branch information
mlschroe committed Jul 15, 2015
1 parent c5dc5c9 commit a3b09e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pool.c
Expand Up @@ -421,7 +421,7 @@ pool_shrink_whatprovidesaux(Pool *pool)
*wp++ = id;
}
newoff = wp - pool->whatprovidesauxdata;
solv_realloc(pool->whatprovidesauxdata, newoff * sizeof(Id));
pool->whatprovidesauxdata = solv_realloc(pool->whatprovidesauxdata, newoff * sizeof(Id));
POOL_DEBUG(SOLV_DEBUG_STATS, "shrunk whatprovidesauxdata from %d to %d\n", pool->whatprovidesauxdataoff, newoff);
pool->whatprovidesauxdataoff = newoff;
}
Expand Down

0 comments on commit a3b09e6

Please sign in to comment.