Cotix/cReddit — pull request #14 by kyleisntwild (2013-07-28 19:09:39+00:00)
Title: Fixes and formatting

### Fixed multiple memory leaks

In main.c we create an array of posts on the stack to pass to the redditGetSubreddit function. When populating each post in the array we alloc space for the id, title, votes, author, and subreddit like so:
```C
postList[atPost].id = malloc(t[i].end-t[i].start+1);
```
After using the array of posts in showSubreddit function these fields were never freed. A couple other things were never freed either and are now fixed.

### Formatting changes

I added a little formatting to the showSubreddit so things are easier to read and look a little more uniform. These changes were kind of hacky and are meant to be temporary until we do some major work on the ncurses display.

Oh and I typedef'd the structs in reddit.h so we don't need to write ```struct``` everywhere.