title: Attributes of a pointer are turned to NULL after passing to a function
body: <p>I have a structure like this.</p>
  
  <pre><code>typedef struct
  {
    example_t *attr_1;
  
    int attr_2;
    ...
  } my_struct_t;
  </code></pre>
  
  <p>There is a wrapper for this structure.</p>
  
  <pre><code>typedef struct
  {
     my_struct_t *my_struct1;
  } my_struct_wrapper_t;
  </code></pre>
  
  <p>Memory is created for the wrapper and structure and is working fine.</p>
  
  <pre><code>my_struct_wrapper_t *wrapper = create_memory();
  set_attribute (my_struct_wrapper_t *wrapper);
  </code></pre>
  
  <p>This creates memory for wrapper->my_struct1 as well as my_struct->attr1;</p>
  
  <p>But the problem is when i pass my_struct1 of wrapper to a function like 
  this </p>
  
  <pre><code>call_function (wrrapper-&gt;my_struct1);
  void call_function (my_struct_t *my_struct){
     my_struct-&gt;attr1 returns NULL.
  }
  </code></pre>