Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions plugins/in_blob/blob_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ int blob_file_append(struct blob_ctx *ctx, char *path, struct stat *st)

#ifdef FLB_HAVE_SQLDB
/* insert the entry into the database */
bfile->db_id = blob_db_file_insert(ctx, path, st->st_size);
if (bfile->db_id < 0) {
cfl_sds_destroy(bfile->path);
flb_free(bfile);
return -1;
if (ctx->database_file) {
bfile->db_id = blob_db_file_insert(ctx, path, st->st_size);
if (bfile->db_id < 0) {
cfl_sds_destroy(bfile->path);
flb_free(bfile);
return -1;
}
}
#endif

Expand Down
Loading