Skip to content
This repository was archived by the owner on Jul 14, 2019. It is now read-only.

Commit fbddede

Browse files
Carlo Marcelo Arenas BelonLior Amram
authored andcommitted
avoid closing wrong fd in vmallocator
1 parent e6ffd04 commit fbddede

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

include/hashtable.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#define _HASHTABLE__H_
2222

2323
#include "vmallocator.h"
24-
#include <string.h>
2524

2625
#define HASHTABLE_INITIALIZER { VMALLOCATOR_INITIALIZER }
2726
#define HASHTABLE_MAKE(x) (x) = (struct hashtable)HASHTABLE_INITIALIZER

include/lhashtable.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
5050
real address = data_start_ofs[block] + (ofs << 3)
5151
52-
5352
*/
5453

5554
/*

src/vmallocator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int vmallocator_open(struct vmallocator *v, const char *filename, int flags) {
4444
vmallocator_free(v);
4545
int fd = open(filename, flags, 0644);
4646
if (0 > fd)
47-
return LOGGER_PERROR("open %s", filename), close(fd), -1;
47+
return LOGGER_PERROR("open %s", filename), -1;
4848
struct stat st;
4949
if (0 > fstat(fd, &st))
5050
return LOGGER_PERROR("fstat, %s", filename), close(fd), -1;

0 commit comments

Comments
 (0)