title: Using free on a struct that contains a pointer to unsigned ints array, fills the array with data
body: <p>(Simplified version of my problem, developing in netbeans)<br>
  I have this struct defined:</p>
  
  <pre><code>typedef struct data_info
  {
      unsigned int* array; //containing ints at hex base
      int x;
  }data;
  </code></pre>
  
  <p>And in main function I am doing these:</p>
  
  <pre><code>data *d = malloc(sizeof(data);
  d-&gt;array = malloc(4*sizeof(unsigned int));
  </code></pre>
  
  <p>After the use of this struct I want to deallocate the memory. I am watching the variables state with netbeans debug:</p>
  
  <pre><code>address of (d-&gt;array) -&gt; 0x605670
  free(d-&gt;array); //makes the array NULL
  d-&gt;array = NULL;
  free(d); //makes the pointer not NULL - adress is 0x605500
  </code></pre>
  
  <p>And also the array state is this (hex values):</p>
  
  <blockquote>
    <p>d->array[0] = 0<br>
    d->array[1] = 0<br>
    d->array[2] = 31<br>
    d->array[3] = 0</p>
  </blockquote>
  
  <p>Why does the d->array get an address value?</p>