Preventing memory leak caused by RRIP SL entry without PX entry that marks the file as symbolic link
This commit is contained in:
parent
36c8800ff3
commit
16bde11076
@ -384,6 +384,7 @@ typedef struct
|
|||||||
bit16= Incomplete SL
|
bit16= Incomplete SL
|
||||||
bit17= Charset conversion error
|
bit17= Charset conversion error
|
||||||
bit18= Link without destination
|
bit18= Link without destination
|
||||||
|
bit19= SL with a non-link file
|
||||||
*/
|
*/
|
||||||
int rr_err_reported;
|
int rr_err_reported;
|
||||||
int rr_err_repeated;
|
int rr_err_repeated;
|
||||||
@ -2093,6 +2094,11 @@ if (name != NULL && !namecont) {
|
|||||||
|
|
||||||
if (S_ISLNK(atts.st_mode)) {
|
if (S_ISLNK(atts.st_mode)) {
|
||||||
ifsdata->data.content = linkdest;
|
ifsdata->data.content = linkdest;
|
||||||
|
} else if (linkdest != NULL) {
|
||||||
|
ret = iso_rr_msg_submit(fsdata, 19, ISO_WRONG_RR_WARN, 0,
|
||||||
|
"RRIP SL link destination with file that is not a link.");
|
||||||
|
free(linkdest);
|
||||||
|
linkdest = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ifsrc->class = &ifs_class;
|
ifsrc->class = &ifs_class;
|
||||||
|
Loading…
Reference in New Issue
Block a user