Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
check: free iterator after we're done with it
Ahmad Khalifa committed 9 months ago
commit 4896a9579648ba02afa62b1d3792f78aefef3d00
parent ae1861a
1 file changed +5 -1
modified src/check.c
@@ -359,6 +359,7 @@ exec_check(int argc, char **argv)
			warnx("No packages matching: %s", argv[i]);
			rc = EXIT_FAILURE;
			pkgdb_it_free(it);
+
			it = NULL;
			goto cleanup;
		}

@@ -417,6 +418,9 @@ exec_check(int argc, char **argv)
					printf(" done\n");
			}
		}
+
		pkgdb_it_free(it);
+
		it = NULL;
+

		if (!quiet && !verbose)
			progressbar_tick(processed, total);
		fflush(out->fp);
@@ -449,9 +453,9 @@ exec_check(int argc, char **argv)
				goto cleanup;
			}
		}
-
		pkgdb_it_free(it);
		i++;
	} while (i < argc);
+
	assert(it == NULL);

cleanup:
	if (!verbose)