Compare commits

...

5 commits

Author SHA1 Message Date
transifex-integration[bot]
dba3f156ff
Merge 9d3498f01e into 805cd550f2 2024-03-06 09:09:42 +13:00
Berthold Stoeger
805cd550f2 cleanup: fix memory leak
get_local_dir() returns the copy of a c-string. It therefore
has to be free()d.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-03-03 14:59:31 -08:00
Berthold Stoeger
a4091189b0 cleanup: use proper size when allocating string
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-03-02 19:21:59 +01:00
transifex-integration[bot]
9d3498f01e
Translate subsurface_source.ts in nl_NL
100% translated source file: 'subsurface_source.ts'
on 'nl_NL'.
2024-02-29 19:58:56 +00:00
transifex-integration[bot]
afcff5da2b
Translate subsurface_source.ts in nl_NL
100% translated source file: 'subsurface_source.ts'
on 'nl_NL'.
2024-02-29 19:57:24 +00:00
3 changed files with 231 additions and 189 deletions

View file

@ -161,7 +161,9 @@ char *get_local_dir(const char *url, const char *branch)
static char *move_local_cache(struct git_info *info)
{
char *old_path = get_local_dir(info->url, info->branch);
return move_away(old_path);
char *new_path = move_away(old_path);
free(old_path);
return new_path;
}
static int check_clean(const char *path, unsigned int status, void *payload)

View file

@ -2261,7 +2261,7 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size, struct divelog *log)
/* Recording the starting battery status to extra data */
if (battery_start.volt1) {
size_t stringsize = snprintf(NULL, 0, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1) + 1;
char *ptr = malloc(size);
char *ptr = malloc(stringsize);
if (ptr) {
snprintf(ptr, stringsize, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1);

File diff suppressed because it is too large Load diff