From 4127daa65ed8962900b386e138577a83bbc6baa5 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 21 Sep 2021 21:37:49 +0200 Subject: test: database --- src/database.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/database.c') 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; -- cgit v1.2.3