Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cktan committed Sep 4, 2020
1 parent f0497cd commit 8c9799d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/c/s3pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,10 @@ char* s3pool_pull(int port, const char* bucket, const char* key,
char* errmsg, int errmsgsz)
{
char* reply = s3pool_pull_ex(port, bucket, &key, 1, errmsg, errmsgsz);
char* term = strchr(reply, '\n');
if (term) *term = 0;
if (reply) {
char* term = strchr(reply, '\n');
if (term) *term = 0;
}
return reply;
}

Expand Down

0 comments on commit 8c9799d

Please sign in to comment.