summaryrefslogtreecommitdiff
path: root/libkmod/libkmod-builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'libkmod/libkmod-builtin.c')
-rw-r--r--libkmod/libkmod-builtin.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkmod/libkmod-builtin.c b/libkmod/libkmod-builtin.c
index aaec5dd..fc9a376 100644
--- a/libkmod/libkmod-builtin.c
+++ b/libkmod/libkmod-builtin.c
@@ -314,6 +314,7 @@ ssize_t kmod_builtin_get_modinfo(struct kmod_ctx *ctx, const char *modname,
offset = get_string(iter, pos, &line, &linesz);
if (offset <= 0) {
count = (offset) ? -errno : -EOF;
+ free(*modinfo);
goto fail;
}