Use sr_realloc instead of realloc

Related to rhbz#951432.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Jakub Filak <jfilak@redhat.com>