On Tue, Mar 21, 2017 at 07:06:45PM +0300, Oleg Strikov wrote:
> Fix for the issue found by address sanitizer.

Looks good to me, thanks for the contribution.

Acked-by: Seth Arnold <[email protected]>

> === modified file 'parser/libapparmor_re/expr-tree.h'
> --- parser/libapparmor_re/expr-tree.h 2016-01-19 23:07:04 +0000
> +++ parser/libapparmor_re/expr-tree.h 2017-03-21 15:33:53 +0000
> @@ -663,25 +663,25 @@
>       hashedNodeVec(NodeSet *n, unsigned long h): hash(h)
>       {
>               len = n->size();
>               nodes = new ImportantNode *[n->size()];
>               ImportantNode **j = nodes;
>               for (NodeSet::iterator i = n->begin(); i != n->end(); i++) {
>                       *(j++) = *i;
>               }
>       }
>  
>       ~hashedNodeVec()
>       {
> -             delete nodes;
> +             delete [] nodes;
>       }
>  
>       unsigned long size()const { return len; }
>  
>       bool operator<(hashedNodeVec const &rhs)const
>       {
>               if (hash == rhs.hash) {
>                       if (len == rhs.size()) {
>                               for (unsigned int i = 0; i < len; i++) {
>                                       if (nodes[i] != rhs.nodes[i])
>                                               return nodes[i] < rhs.nodes[i];
>                               }
> 
> Thanks,
> Oleg

Attachment: signature.asc
Description: PGP signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to