diff mbox

[2/2] libsemanage: increment the right index variable in for loop

Message ID 20170104214623.24674-2-nicolas.iooss@m4x.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Nicolas Iooss Jan. 4, 2017, 9:46 p.m. UTC
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 libsemanage/src/semanage_store.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Carter Jan. 6, 2017, 7:31 p.m. UTC | #1
On 01/04/2017 04:46 PM, Nicolas Iooss wrote:
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Applied.

Thanks,

> ---
>  libsemanage/src/semanage_store.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
> index 58a58ef9452e..f468faba4b64 100644
> --- a/libsemanage/src/semanage_store.c
> +++ b/libsemanage/src/semanage_store.c
> @@ -1158,7 +1158,7 @@ cleanup:
>  	free(all_modinfos);
>
>  	if (status != 0) {
> -		for (i = 0; i < j; j++) {
> +		for (i = 0; i < j; i++) {
>  			semanage_module_info_destroy(sh, &(*modinfo)[i]);
>  		}
>  		free(*modinfo);
>
diff mbox

Patch

diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
index 58a58ef9452e..f468faba4b64 100644
--- a/libsemanage/src/semanage_store.c
+++ b/libsemanage/src/semanage_store.c
@@ -1158,7 +1158,7 @@  cleanup:
 	free(all_modinfos);
 
 	if (status != 0) {
-		for (i = 0; i < j; j++) {
+		for (i = 0; i < j; i++) {
 			semanage_module_info_destroy(sh, &(*modinfo)[i]);
 		}
 		free(*modinfo);