Skip to content

Commit

Permalink
Check for NULL deref
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHogan committed Aug 20, 2021
1 parent e234947 commit 7a1ee56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/metadata_management.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,10 @@ int LocalGetNumOutstandingFlushingTasks(SharedMemoryContext *context,
VBucketID id) {
MetadataManager *mdm = GetMetadataManagerFromContext(context);
VBucketInfo *info = LocalGetVBucketInfoById(mdm, id);
int result = info->async_flush_count;
int result = 0;
if (info) {
result = info->async_flush_count;
}

return result;
}
Expand Down

0 comments on commit 7a1ee56

Please sign in to comment.