e97ff3e Fix infinite loop due to bad sign of variable

Authored and Committed by simo 11 years ago
    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>