Diffstat (limited to 'noncore/todayplugins/stockticker/libstocks/currency.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/currency.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/todayplugins/stockticker/libstocks/currency.c b/noncore/todayplugins/stockticker/libstocks/currency.c index 9a08a9d..e0090e2 100644 --- a/noncore/todayplugins/stockticker/libstocks/currency.c +++ b/noncore/todayplugins/stockticker/libstocks/currency.c @@ -39,28 +39,29 @@ libstocks_return_code get_currency_exchange(char *from, char *symbol; stock *data; libstocks_return_code error; if((symbol = (char *)malloc(strlen(from)+strlen(into)+3))==NULL) { fprintf(stderr,"Memory allocating error (%s line %d)\n" ,__FILE__, __LINE__); exit(1); } strcpy(symbol, from); strcat(symbol, into); strcat(symbol, "=X"); error = get_stocks(symbol, &data); + free(symbol); if (error) { *exchange = 0; return(error); } free_stocks(data); *exchange = data->CurrentPrice; return(error); } |