Why free() in C isn't work? : <pre><code>int main()
{
    char* in = (char *)malloc(sizeof(char)*100);
    in = "Sort of Input String with LITERALS AND NUMBERS\0";
    free(in);
    return 0;
}
</code></pre>

<p>Why this code isn't working with this error?</p>

<pre><code>pointers(10144,0x7fff78a82000) malloc: *** error for object 0x10ba18f88: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
bash: line 1: 10144 Abort trap: 6           '/Users/.../Documents/term2_sr/pointers'
[Finished in 0.1s with exit code 134]
</code></pre>
