Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
pkg-query: Fix memory leaks
Mark Johnston committed 8 months ago
commit bc1ad7720bd0fe048e5a195ec578aab4ccf63492
parent aa43be201f008a0a487bd3126e646126422e58da
1 file changed +8 -0
modified src/query.c
@@ -413,6 +413,8 @@ print_query(struct pkg *pkg, char *qstr, char multiline)
			format_str(pkg, output, qstr, str);
			printf("%s\n", output->buf);
		}
+
		free(slit);
+
		free(sl);
		break;
	case 'G':
		pkg_get(pkg, PKG_ATTR_GROUPS, &sl);
@@ -421,6 +423,8 @@ print_query(struct pkg *pkg, char *qstr, char multiline)
			format_str(pkg, output, qstr, str);
			printf("%s\n", output->buf);
		}
+
		free(slit);
+
		free(sl);
		break;
	case 'B':
		pkg_get(pkg, PKG_ATTR_SHLIBS_REQUIRED, &sl);
@@ -429,6 +433,8 @@ print_query(struct pkg *pkg, char *qstr, char multiline)
			format_str(pkg, output, qstr, str);
			printf("%s\n", output->buf);
		}
+
		free(slit);
+
		free(sl);
		break;
	case 'b':
		pkg_get(pkg, PKG_ATTR_SHLIBS_PROVIDED, &sl);
@@ -437,6 +443,8 @@ print_query(struct pkg *pkg, char *qstr, char multiline)
			format_str(pkg, output, qstr, str);
			printf("%s\n", output->buf);
		}
+
		free(slit);
+
		free(sl);
		break;
	case 'A':
		pkg_get(pkg, PKG_ATTR_ANNOTATIONS, &kl);