Fix infinite loop due to bad sign of variable
Change the i variable to be a signed integer ot the loop will never end because
and unsigned integer decremented past 0 simply wraps to a very big integer.
The condition that would break the loop can never be true therefore the code
would loop forever until eventually a double free would cause a crash.
Found by Coverity.
Signed-off-by: Simo Sorce <simo@redhat.com>