Skip to content

Commit

Permalink
Fix memory leak con connection constructor, closes luca3m#9
Browse files Browse the repository at this point in the history
  • Loading branch information
luca3m committed Sep 24, 2014
1 parent 2d34b8f commit c64b16f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ connection::connection(const std::string& host, const unsigned port)
c = redisConnect(host.c_str(), port);
if (c->err != REDIS_OK)
{
redisFree(c);
throw unable_to_connect();
}
}
Expand Down

0 comments on commit c64b16f

Please sign in to comment.