title: checking that `malloc` succeeded in C
body: <p>I want to allocate memory using <code>malloc</code> and check that it succeeded. something like:</p>
  
  <pre><code>if (!(new_list=(vlist)malloc(sizeof (var_list))))
    return -1;
  </code></pre>
  
  <p>how do I check success?</p>