mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
- We don't need to test for NULL before free()
This commit is contained in:
parent
bcf3a3ab93
commit
2e0145fb95
6
dbutil.c
6
dbutil.c
@ -800,12 +800,6 @@ void * m_strdup(const char * str) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __m_free(void* ptr) {
|
|
||||||
if (ptr != NULL) {
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void * m_realloc(void* ptr, size_t size) {
|
void * m_realloc(void* ptr, size_t size) {
|
||||||
|
|
||||||
void *ret;
|
void *ret;
|
||||||
|
3
dbutil.h
3
dbutil.h
@ -83,8 +83,7 @@ void m_close(int fd);
|
|||||||
void * m_malloc(size_t size);
|
void * m_malloc(size_t size);
|
||||||
void * m_strdup(const char * str);
|
void * m_strdup(const char * str);
|
||||||
void * m_realloc(void* ptr, size_t size);
|
void * m_realloc(void* ptr, size_t size);
|
||||||
#define m_free(X) __m_free(X); (X) = NULL;
|
#define m_free(X) free(X); (X) = NULL;
|
||||||
void __m_free(void* ptr);
|
|
||||||
void m_burn(void* data, unsigned int len);
|
void m_burn(void* data, unsigned int len);
|
||||||
void setnonblocking(int fd);
|
void setnonblocking(int fd);
|
||||||
void disallow_core();
|
void disallow_core();
|
||||||
|
Loading…
Reference in New Issue
Block a user