Diffstat (limited to 'noncore/todayplugins/stockticker/libstocks/stocks.c') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/stocks.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/noncore/todayplugins/stockticker/libstocks/stocks.c b/noncore/todayplugins/stockticker/libstocks/stocks.c index eb04ba9..3a26a47 100644 --- a/noncore/todayplugins/stockticker/libstocks/stocks.c +++ b/noncore/todayplugins/stockticker/libstocks/stocks.c @@ -239,3 +239,2 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) case YAHOO_US: - if (us_quotes) @@ -248,4 +247,4 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) { - fprintf(stderr,"Memory allocating error (%s line %d)\n" - ,__FILE__, __LINE__); + fprintf(stderr,"Memory allocating error (%s line %d)\n", + __FILE__, __LINE__); exit(1); @@ -265,4 +264,4 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) { - fprintf(stderr,"Memory allocating error (%s line %d)\n" - ,__FILE__, __LINE__); + fprintf(stderr,"Memory allocating error (%s line %d)\n", + __FILE__, __LINE__); exit(1); @@ -275,3 +274,2 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) case YAHOO_EUROPE: - if (eu_quotes) @@ -284,4 +282,4 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) { - fprintf(stderr,"Memory allocating error (%s line %d)\n" - ,__FILE__, __LINE__); + fprintf(stderr,"Memory allocating error (%s line %d)\n", + __FILE__, __LINE__); exit(1); @@ -300,4 +298,4 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) { - fprintf(stderr,"Memory allocating error (%s line %d)\n" - ,__FILE__, __LINE__); + fprintf(stderr,"Memory allocating error (%s line %d)\n", + __FILE__, __LINE__); exit(1); @@ -316,2 +314,3 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) error = download_stocks(us_quotes, &stocks_tmp, YAHOO_US); + free(us_quotes); if (error) return error; @@ -323,2 +322,3 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) error = download_stocks(eu_quotes, &stocks_getted, YAHOO_EUROPE); + free(eu_quotes); if (error) return error; @@ -340,3 +340,4 @@ libstocks_return_code get_stocks(const char *stocks, stock **stock_datas) } - else (stocks_tmp = stocks_getted); + else + (stocks_tmp = stocks_getted); } |