diff options
Diffstat (limited to 'nserver/src/protocol.c')
-rw-r--r-- | nserver/src/protocol.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nserver/src/protocol.c b/nserver/src/protocol.c index 0357623..4d57eea 100644 --- a/nserver/src/protocol.c +++ b/nserver/src/protocol.c @@ -17,6 +17,10 @@ int sscreate(char *key) if (rec != NULL && rec->deleted == 1) { rec->deleted = 0; + // Allocate fresh Stats. + rec->st = Stats_create(); + check(rec->st != NULL, "stats creation failed"); + return 2; } @@ -60,6 +64,9 @@ int ssdelete(char *key) // Mark as deleted. rec->deleted = 1; + // Free Stats. + free(rec->st); + return 0; error: return -1; |