Pascal's triangle in C
Looks pretty good to me. If I were doing this for an interview question, I would take on the challenge of implementing it recursively. Here are some minor changes I would make:


You are hard-coding your for loop to 31 iterations. That ought to be a const uint32_t num_iterations = 31; at the top of your code. That makes it more clear to future users what to change if they want a different number of iterations.
You are using int64_t. These are all going to be positive numbers, so uint64_t is more appropriate.
Your variables i and size are int64_t. But your values are going to overflow 64-bits well before the line they are on gets that big. I'm guessing that uint32_t is enough.
In regards to the memory management, all of the allocing and freeing is expensive and slow. If you wanted to minimize that, you should alloc 2 rows of max length up front and then ping-pong them as previous/next rows.
In your next_pascal_row routine, you're using an array pointer called retval. I see that name way overused. It would be better called this_row or next_row.
There is no need for a first_row pointer. Just use the previous_row pointer in initialization.