Doubly linked list in C
Welcome on Code Review

Generalities

Includes

You don't need #include &lt;stdlib.h&gt; in linkedlist.h, so remove it and instead, just add it in linkedlist.c  right after #include linkedlist.h.

Name collisions

I'll discuss no more this subject after but be aware that names like node, list, size or clear for example, are very usual and subject to collisions. Consider using more robust names, maybe with a prefix.

Usable interface

Since the user look at your header file to know how to use your functions, a good habit is to to name the arguments, that's make the interface more explicit. Furthermore, adding documentation as comments about your interface help them to use it correctly.

Use the const keyword

Read this and this to know when et how.

Assertions and error-checking

You could use assertions to check preconditions, postconditions and invariants. It make your code more explicit and you avoid possibly broke you code when modifying.


How to use assertions in C
How and When to Use C's assert() Macro
Why should I use asserts? (for C++ but still applicable)




struct node

[typedef] struct [tag] { ... } [alias];

Personally, I try to avoid to use sames ''struct tag'' and ''typedef name'' if I have to typedef a struct. It's completely a matter of taste, since "modern" compilers (for more than 20 years)  can handle this easily, but so, user know when he work with the tag or the alias. 

But there are many others "conventions":


Some prefer "untagged aliased struct" (if there are no self-referencing members). 
Where others says to never typedef a struct. 
...


Consistency

No matter where you place asterisk for pointers, try to be consistent through your code:

void* data;
    ^ LEFT-ALIGNED
struct node *next;
            ^ RIGHT-ALIGNED


(here is another talk on this endless debate)

So IMHO, this is cleaner:

typedef struct node node_t;
typedef node_t* node_ptr;

struct node {
    void* data;
    node_ptr next;
    node_ptr prev;
};




struct List

Consistency

The first letter of the struct node is lowercase, while the first of the struct List is uppercase.

Variables declaration

Try to don't declare several variables on the same line, it will avoid you many problems.

typedef struct list list_t;
typedef list_t* list_ptr;

struct list {
    node_ptr head;
    node_ptr tail;
};




init_list(), push_back(), push_front()


There's no need to cast the return type of malloc from void* since it's implicitly converted to any pointer type. 
You can also omit the struct  as you aliases it.
Optionally, you could make more concise using calloc and rid of the manual initialization of next and prev (with few costs).
Since you have a free_list function, consider renaming init_list to  alloc_list
For push_* function, you should use sizeof *list-&gt;head  instead of using the type. It's easier to maintain. (e.g. if you modify the node type latter, the change here is automatic)
For push_* function, you could return an int, an enum or a bool (via &lt;stdbool.h&gt;)  to indicate the success of the insert (since the malloc can fail) or a pointer to the new created node (and so NULL in case of fail). No matter how but you should always handle errors when using malloc


pop_back(), pop_front()


I find multiples assignments on same line less readable, but that's my opinion.
For info: On some not-wide-used platforms (PalmOS, 3BSD, and other non ANSI-C compatibles), you should check for NULL before freeing to avoid crashes.


clear()


You could rewrite the cleaning algorithm to be more efficient since you discard return values.


free_list()


Simply use clear before freeing, to avoid code duplication.