summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/pkg_extract.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libopkg/pkg_extract.c b/libopkg/pkg_extract.c
index 4257d59..e1b4018 100644
--- a/libopkg/pkg_extract.c
+++ b/libopkg/pkg_extract.c
@@ -37,7 +37,11 @@ int pkg_extract_control_file_to_stream(pkg_t *pkg, FILE *stream)
return EINVAL;
}
- fputs(buffer, stream);
+ if (fputs(buffer, stream) == EOF) {
+ free(buffer);
+ return EINVAL;
+ }
+
free(buffer);
return 0;