aboutsummaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 21:37:49 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 21:37:49 +0200
commit4127daa65ed8962900b386e138577a83bbc6baa5 (patch)
treea923ad42e411d94ac31a20d149dacd86ae648c31 /src/database.c
parenta0ff652261af4bebad0419aaf99ccea64c7ccf2e (diff)
downloaddns-4127daa65ed8962900b386e138577a83bbc6baa5.tar.gz
test: database
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c
index 21174f7..491fae1 100644
--- a/src/database.c
+++ b/src/database.c
@@ -10,6 +10,9 @@ int database_init ( database_t* _database ) {
unsigned int i = 0;
size_t rr_size;
+ if ( !_database )
+ return 1;
+
/* Initialize 2D array of tree_node pointers, paranoia style */
if ( !( _database->zone = malloc( sizeof( tree_node_t** ) * DB_CLASS_LEN ) ) )
return 1;