summaryrefslogtreecommitdiffstats
path: root/hl/src/H5DS.c
diff options
context:
space:
mode:
Diffstat (limited to 'hl/src/H5DS.c')
-rw-r--r--hl/src/H5DS.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index cb3a1ce..5f8cd50 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -1872,12 +1872,9 @@ ssize_t H5DSget_scale_name(hid_t did,
if (H5Sclose(sid) < 0)
goto out;
if (buf)
- {
free(buf);
- buf=NULL;
- }
- return (ssize_t) MAX(0,nbytes-1);
+ return (ssize_t)(nbytes - 1);
/* error zone */
out:
@@ -1887,10 +1884,7 @@ out:
H5Sclose(sid);
} H5E_END_TRY;
if (buf)
- {
free(buf);
- buf=NULL;
- }
return FAIL;
}