diff options
Diffstat (limited to 'src/info.c')
-rw-r--r-- | src/info.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -130,9 +130,11 @@ static void info_who_owns(struct info_ctx *ctx, struct apk_database *db, } if (apk_verbosity < 1 && deps->num != 0) { os = apk_ostream_to_fd(STDOUT_FILENO); - apk_deps_write(db, deps, os, APK_BLOB_PTR_LEN(" ", 1)); - os->write(os, "\n", 1); - os->close(os); + if (!IS_ERR_OR_NULL(os)) { + apk_deps_write(db, deps, os, APK_BLOB_PTR_LEN(" ", 1)); + os->write(os, "\n", 1); + os->close(os); + } } apk_dependency_array_free(&deps); } |