• Raghavendra Koushik's avatar
    [PATCH] S2io: fixes in free_shared_mem function · 477dfa31
    Raghavendra Koushik authored
    Hello All,
    	As per KK's review comment received on Nov 8 about the free_shared_mem function, Iam sending the following patch.
    
    The change log includes:
    
    1. Break from the main 'for loop' if ba[i] is NULL.
    
    2. In the second level 'for loop', if ba[i][j] is NULL, instead of
    continuing as was done previously, we now free the ba[i] pointer and
    break from the main 'for loop'.
    
    3. In the 'while loop' inside the second tier 'for loop', if any of the
    three pointers (ba or ba->ba_0_org or ba->ba_1_org) is found to be NULL,
    then ba[i], ba[i][j] and the non NULL buffer pointer if any
    (ba_0_org or ba_1_org) is freed and break from the main 'for loop'.
    Signed-off-by: default avatarKoushik <raghavendra.koushik@s2io.com>
    Signed-off-by: default avatarRavi <ravinandan.arakali@s2io.com>
    Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
    477dfa31
s2io.c 139 KB