Error-checking macro to jump to specified label given a failing statement
NULL dereference

If allocate_empty_db() returns NULL, it will jump to the error handling code, which will cause a NULL dereference when it tries to free(db-&gt;metadatas).  You will need to guard that line like this:

if (db)
    free(db-&gt;metadatas);


The macro

I'm not exactly a fan of the macro.  First, calling it try makes me think your code is java, and then when I realize it isn't, I'm more confused.  Second, if your label is always going to be the same in every function, then you can omit the second argument of the macro and just hardcode it to goto error.  That way the macro can look smaller and the reader doesn't have to parse the extra comma and argument (which look like part of the body you are try-ing).

Also, the macro should be a do while instead of an if.  You could get in trouble with code like this:

if (condition)
    try(foo(), error);
else
    bar();


Here, your macro will cause the above to expand to:

if (condition)
    if (!foo()) { goto error; };
else
    bar();


Which is actually a syntax error because of the extra semicolon but is also close to making the else pair with the wrong if.  The macro should look like this instead:

#define try( stmt , error_label )              \
        do {                                   \
            if (!(stmt)) { goto error_label; } \
        } while(0)


This do while(0) construction is a common trick when writing C macros.  It allows a multi-statement macro to be used in an if statement like the one in my example.  See this Stackoverflow question for more info.