 <p>You are dereferencing an uninitialized pointer. This is <a href="http://en.wikipedia.org/wiki/Undefined_behavior" rel="nofollow">undefined behavior</a>. It worked the first time because you were lucky.</p>